Archived
saving dependency work
This commit is contained in:
@@ -12,7 +12,7 @@ from pip._internal.utils.compat import stdlib_pkgs
|
||||
from pip._internal.utils.deprecation import deprecated
|
||||
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
|
||||
|
||||
DEV_PKGS = {'pip', 'setuptools', 'distribute', 'wheel', 'pkg-resources'}
|
||||
DEV_PKGS = {"pip", "setuptools", "distribute", "wheel", "pkg-resources"}
|
||||
|
||||
if MYPY_CHECK_RUNNING:
|
||||
from optparse import Values
|
||||
@@ -33,47 +33,55 @@ class FreezeCommand(Command):
|
||||
def add_options(self):
|
||||
# type: () -> None
|
||||
self.cmd_opts.add_option(
|
||||
'-r', '--requirement',
|
||||
dest='requirements',
|
||||
action='append',
|
||||
"-r",
|
||||
"--requirement",
|
||||
dest="requirements",
|
||||
action="append",
|
||||
default=[],
|
||||
metavar='file',
|
||||
metavar="file",
|
||||
help="Use the order in the given requirements file and its "
|
||||
"comments when generating output. This option can be "
|
||||
"used multiple times.")
|
||||
"comments when generating output. This option can be "
|
||||
"used multiple times.",
|
||||
)
|
||||
self.cmd_opts.add_option(
|
||||
'-f', '--find-links',
|
||||
dest='find_links',
|
||||
action='append',
|
||||
"-f",
|
||||
"--find-links",
|
||||
dest="find_links",
|
||||
action="append",
|
||||
default=[],
|
||||
metavar='URL',
|
||||
help='URL for finding packages, which will be added to the '
|
||||
'output.')
|
||||
metavar="URL",
|
||||
help="URL for finding packages, which will be added to the " "output.",
|
||||
)
|
||||
self.cmd_opts.add_option(
|
||||
'-l', '--local',
|
||||
dest='local',
|
||||
action='store_true',
|
||||
"-l",
|
||||
"--local",
|
||||
dest="local",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help='If in a virtualenv that has global access, do not output '
|
||||
'globally-installed packages.')
|
||||
help="If in a virtualenv that has global access, do not output "
|
||||
"globally-installed packages.",
|
||||
)
|
||||
self.cmd_opts.add_option(
|
||||
'--user',
|
||||
dest='user',
|
||||
action='store_true',
|
||||
"--user",
|
||||
dest="user",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help='Only output packages installed in user-site.')
|
||||
help="Only output packages installed in user-site.",
|
||||
)
|
||||
self.cmd_opts.add_option(cmdoptions.list_path())
|
||||
self.cmd_opts.add_option(
|
||||
'--all',
|
||||
dest='freeze_all',
|
||||
action='store_true',
|
||||
help='Do not skip these packages in the output:'
|
||||
' {}'.format(', '.join(DEV_PKGS)))
|
||||
"--all",
|
||||
dest="freeze_all",
|
||||
action="store_true",
|
||||
help="Do not skip these packages in the output:"
|
||||
" {}".format(", ".join(DEV_PKGS)),
|
||||
)
|
||||
self.cmd_opts.add_option(
|
||||
'--exclude-editable',
|
||||
dest='exclude_editable',
|
||||
action='store_true',
|
||||
help='Exclude editable package from output.')
|
||||
"--exclude-editable",
|
||||
dest="exclude_editable",
|
||||
action="store_true",
|
||||
help="Exclude editable package from output.",
|
||||
)
|
||||
self.cmd_opts.add_option(cmdoptions.list_exclude())
|
||||
|
||||
self.parser.insert_option_group(0, self.cmd_opts)
|
||||
@@ -112,5 +120,5 @@ class FreezeCommand(Command):
|
||||
)
|
||||
|
||||
for line in freeze(**freeze_kwargs):
|
||||
sys.stdout.write(line + '\n')
|
||||
sys.stdout.write(line + "\n")
|
||||
return SUCCESS
|
||||
|
||||
Reference in New Issue
Block a user