"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "poetry/console/commands/build.py" between
poetry-1.1.15.tar.gz and poetry-1.2.0.tar.gz

About: Poetry is a tool for dependency management and packaging in Python.

build.py  (poetry-1.1.15):build.py  (poetry-1.2.0)
from cleo import option from __future__ import annotations
from .env_command import EnvCommand from cleo.helpers import option
class BuildCommand(EnvCommand): from poetry.console.commands.env_command import EnvCommand
from poetry.utils.env import build_environment
class BuildCommand(EnvCommand):
name = "build" name = "build"
description = "Builds a package, as a tarball and a wheel by default." description = "Builds a package, as a tarball and a wheel by default."
options = [ options = [
option("format", "f", "Limit the format to either sdist or wheel.", flag =False) option("format", "f", "Limit the format to either sdist or wheel.", flag =False)
] ]
loggers = [ loggers = [
"poetry.core.masonry.builders.builder", "poetry.core.masonry.builders.builder",
"poetry.core.masonry.builders.sdist", "poetry.core.masonry.builders.sdist",
"poetry.core.masonry.builders.wheel", "poetry.core.masonry.builders.wheel",
] ]
def handle(self): def handle(self) -> int:
from poetry.core.masonry import Builder from poetry.core.masonry.builder import Builder
fmt = "all" with build_environment(poetry=self.poetry, env=self.env, io=self.io) as
if self.option("format"): env:
fmt = self.option("format") fmt = self.option("format") or "all"
package = self.poetry.package
package = self.poetry.package self.line(
self.line( f"Building <c1>{package.pretty_name}</c1> (<c2>{package.version}
"Building <c1>{}</c1> (<c2>{}</c2>)".format( </c2>)"
package.pretty_name, package.version
) )
)
builder = Builder(self.poetry) builder = Builder(self.poetry)
builder.build(fmt, executable=self.env.python) builder.build(fmt, executable=env.python)
return 0
 End of changes. 8 change blocks. 
14 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)