mirror of https://github.com/pypa/pip
Merge pull request #9418 from sbidoul/freeze-does-not-need-wheel-cache
Remove unused wheel_cache argument in freeze operation
This commit is contained in:
commit
e157cf56b2
|
@ -1,10 +1,8 @@
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from pip._internal.cache import WheelCache
|
|
||||||
from pip._internal.cli import cmdoptions
|
from pip._internal.cli import cmdoptions
|
||||||
from pip._internal.cli.base_command import Command
|
from pip._internal.cli.base_command import Command
|
||||||
from pip._internal.cli.status_codes import SUCCESS
|
from pip._internal.cli.status_codes import SUCCESS
|
||||||
from pip._internal.models.format_control import FormatControl
|
|
||||||
from pip._internal.operations.freeze import freeze
|
from pip._internal.operations.freeze import freeze
|
||||||
from pip._internal.utils.compat import stdlib_pkgs
|
from pip._internal.utils.compat import stdlib_pkgs
|
||||||
from pip._internal.utils.deprecation import deprecated
|
from pip._internal.utils.deprecation import deprecated
|
||||||
|
@ -78,8 +76,6 @@ class FreezeCommand(Command):
|
||||||
|
|
||||||
def run(self, options, args):
|
def run(self, options, args):
|
||||||
# type: (Values, List[str]) -> int
|
# type: (Values, List[str]) -> int
|
||||||
format_control = FormatControl(set(), set())
|
|
||||||
wheel_cache = WheelCache(options.cache_dir, format_control)
|
|
||||||
skip = set(stdlib_pkgs)
|
skip = set(stdlib_pkgs)
|
||||||
if not options.freeze_all:
|
if not options.freeze_all:
|
||||||
skip.update(DEV_PKGS)
|
skip.update(DEV_PKGS)
|
||||||
|
@ -97,18 +93,15 @@ class FreezeCommand(Command):
|
||||||
issue=9069,
|
issue=9069,
|
||||||
)
|
)
|
||||||
|
|
||||||
freeze_kwargs = dict(
|
for line in freeze(
|
||||||
requirement=options.requirements,
|
requirement=options.requirements,
|
||||||
find_links=options.find_links,
|
find_links=options.find_links,
|
||||||
local_only=options.local,
|
local_only=options.local,
|
||||||
user_only=options.user,
|
user_only=options.user,
|
||||||
paths=options.path,
|
paths=options.path,
|
||||||
isolated=options.isolated_mode,
|
isolated=options.isolated_mode,
|
||||||
wheel_cache=wheel_cache,
|
|
||||||
skip=skip,
|
skip=skip,
|
||||||
exclude_editable=options.exclude_editable,
|
exclude_editable=options.exclude_editable,
|
||||||
)
|
):
|
||||||
|
|
||||||
for line in freeze(**freeze_kwargs):
|
|
||||||
sys.stdout.write(line + '\n')
|
sys.stdout.write(line + '\n')
|
||||||
return SUCCESS
|
return SUCCESS
|
||||||
|
|
|
@ -33,8 +33,6 @@ if MYPY_CHECK_RUNNING:
|
||||||
|
|
||||||
from pip._vendor.pkg_resources import Distribution, Requirement
|
from pip._vendor.pkg_resources import Distribution, Requirement
|
||||||
|
|
||||||
from pip._internal.cache import WheelCache
|
|
||||||
|
|
||||||
RequirementInfo = Tuple[Optional[Union[str, Requirement]], bool, List[str]]
|
RequirementInfo = Tuple[Optional[Union[str, Requirement]], bool, List[str]]
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,7 +46,6 @@ def freeze(
|
||||||
user_only=False, # type: bool
|
user_only=False, # type: bool
|
||||||
paths=None, # type: Optional[List[str]]
|
paths=None, # type: Optional[List[str]]
|
||||||
isolated=False, # type: bool
|
isolated=False, # type: bool
|
||||||
wheel_cache=None, # type: Optional[WheelCache]
|
|
||||||
exclude_editable=False, # type: bool
|
exclude_editable=False, # type: bool
|
||||||
skip=() # type: Container[str]
|
skip=() # type: Container[str]
|
||||||
):
|
):
|
||||||
|
|
Loading…
Reference in New Issue