def __init__(self, *args, **kw): super(FreezeCommand, self).__init__(*args, **kw) self.cmd_opts.add_option( "-r", "--requirement", dest="requirements", action="append", default=[], metavar="file", help="Use the order in the given requirements file and its " "comments when generating output. This option can be " "used multiple times.", ) self.cmd_opts.add_option( "-f", "--find-links", dest="find_links", action="append", default=[], 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", default=False, 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", default=False, 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)), ) self.cmd_opts.add_option( "--exclude-editable", dest="exclude_editable", action="store_true", help="Exclude editable package from output.", ) self.parser.insert_option_group(0, self.cmd_opts)
def __init__(self, *args, **kw): super(FreezeCommand, self).__init__(*args, **kw) self.cmd_opts.add_option( '-r', '--requirement', dest='requirements', action='append', default=[], metavar='file', help="Use the order in the given requirements file and its " "comments when generating output. This option can be " "used multiple times.") self.cmd_opts.add_option( '-f', '--find-links', dest='find_links', action='append', default=[], 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', default=False, 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', default=False, 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))) self.cmd_opts.add_option('--exclude-editable', dest='exclude_editable', action='store_true', help='Exclude editable package from output.') self.parser.insert_option_group(0, self.cmd_opts)
def add_options(self) -> None: self.cmd_opts.add_option( "--local", action="store_true", default=False, help=("If in a virtualenv that has global access, do not list " "globally-installed packages."), ) self.cmd_opts.add_option( "--user", dest="user", action="store_true", default=False, help="Only output packages installed in user-site.", ) self.cmd_opts.add_option(cmdoptions.list_path()) self.parser.insert_option_group(0, self.cmd_opts)
def add_options(self) -> None: self.cmd_opts.add_option( "-r", "--requirement", dest="requirements", action="append", default=[], metavar="file", help=("Use the order in the given requirements file and its " "comments when generating output. This option can be " "used multiple times."), ) self.cmd_opts.add_option( "-l", "--local", dest="local", action="store_true", default=False, 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", default=False, 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))), ) self.cmd_opts.add_option( "--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)
def add_options(self): # type: () -> None self.cmd_opts.add_option( '-r', '--requirement', dest='requirements', action='append', default=[], metavar='file', help="Use the order in the given requirements file and its " "comments when generating output. This option can be " "used multiple times.") self.cmd_opts.add_option( '-l', '--local', dest='local', action='store_true', default=False, 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', default=False, 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))) self.cmd_opts.add_option('--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)
def __init__(self, *args, **kw): super(ListCommand, self).__init__(*args, **kw) cmd_opts = self.cmd_opts cmd_opts.add_option('-o', '--outdated', action='store_true', default=False, help='List outdated packages') cmd_opts.add_option('-u', '--uptodate', action='store_true', default=False, help='List uptodate packages') cmd_opts.add_option('-e', '--editable', action='store_true', default=False, help='List editable projects.') cmd_opts.add_option( '-l', '--local', action='store_true', default=False, help=('If in a virtualenv that has global access, do not list ' 'globally-installed packages.'), ) self.cmd_opts.add_option( '--user', dest='user', action='store_true', default=False, help='Only output packages installed in user-site.') cmd_opts.add_option(cmdoptions.list_path()) cmd_opts.add_option( '--pre', action='store_true', default=False, help=("Include pre-release and development versions. By default, " "pip only finds stable versions."), ) cmd_opts.add_option( '--format', action='store', dest='list_format', default="columns", choices=('columns', 'freeze', 'json'), help="Select the output format among: columns (default), freeze, " "or json", ) cmd_opts.add_option( '--not-required', action='store_true', dest='not_required', help="List packages that are not dependencies of " "installed packages.", ) cmd_opts.add_option( '--exclude-editable', action='store_false', dest='include_editable', help='Exclude editable package from output.', ) cmd_opts.add_option( '--include-editable', action='store_true', dest='include_editable', help='Include editable package from output.', default=True, ) index_opts = cmdoptions.make_option_group(cmdoptions.index_group, self.parser) self.parser.insert_option_group(0, index_opts) self.parser.insert_option_group(0, cmd_opts)
def add_options(self): # type: () -> None self.cmd_opts.add_option( "-o", "--outdated", action="store_true", default=False, help="List outdated packages", ) self.cmd_opts.add_option( "-u", "--uptodate", action="store_true", default=False, help="List uptodate packages", ) self.cmd_opts.add_option( "-e", "--editable", action="store_true", default=False, help="List editable projects.", ) self.cmd_opts.add_option( "-l", "--local", action="store_true", default=False, help=("If in a virtualenv that has global access, do not list " "globally-installed packages."), ) self.cmd_opts.add_option( "--user", dest="user", action="store_true", default=False, help="Only output packages installed in user-site.", ) self.cmd_opts.add_option(cmdoptions.list_path()) self.cmd_opts.add_option( "--pre", action="store_true", default=False, help=("Include pre-release and development versions. By default, " "pip only finds stable versions."), ) self.cmd_opts.add_option( "--format", action="store", dest="list_format", default="columns", choices=("columns", "freeze", "json"), help="Select the output format among: columns (default), freeze, " "or json", ) self.cmd_opts.add_option( "--not-required", action="store_true", dest="not_required", help="List packages that are not dependencies of " "installed packages.", ) self.cmd_opts.add_option( "--exclude-editable", action="store_false", dest="include_editable", help="Exclude editable package from output.", ) self.cmd_opts.add_option( "--include-editable", action="store_true", dest="include_editable", help="Include editable package from output.", default=True, ) index_opts = cmdoptions.make_option_group(cmdoptions.index_group, self.parser) self.parser.insert_option_group(0, index_opts) self.parser.insert_option_group(0, self.cmd_opts)
def add_options(self): # type: () -> None self.cmd_opts.add_option( '-o', '--outdated', action='store_true', default=False, help='List outdated packages') self.cmd_opts.add_option( '-u', '--uptodate', action='store_true', default=False, help='List uptodate packages') self.cmd_opts.add_option( '-e', '--editable', action='store_true', default=False, help='List editable projects.') self.cmd_opts.add_option( '-l', '--local', action='store_true', default=False, help=('If in a virtualenv that has global access, do not list ' 'globally-installed packages.'), ) self.cmd_opts.add_option( '--user', dest='user', action='store_true', default=False, help='Only output packages installed in user-site.') self.cmd_opts.add_option(cmdoptions.list_path()) self.cmd_opts.add_option( '--pre', action='store_true', default=False, help=("Include pre-release and development versions. By default, " "pip only finds stable versions."), ) self.cmd_opts.add_option( '--format', action='store', dest='list_format', default="columns", choices=('columns', 'freeze', 'json'), help="Select the output format among: columns (default), freeze, " "or json", ) self.cmd_opts.add_option( '--not-required', action='store_true', dest='not_required', help="List packages that are not dependencies of " "installed packages.", ) self.cmd_opts.add_option( '--exclude-editable', action='store_false', dest='include_editable', help='Exclude editable package from output.', ) self.cmd_opts.add_option( '--include-editable', action='store_true', dest='include_editable', help='Include editable package from output.', default=True, )