Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
FreezeCommand Class Reference
Inheritance diagram for FreezeCommand:
Collaboration diagram for FreezeCommand:

Public Member Functions

None add_options (self)
 
int run (self, Values options, List[str] args)
 
- Public Member Functions inherited from Command
None __init__ (self, str name, str summary, bool isolated=False)
 
None handle_pip_version_check (self, Values options)
 
Tuple[Values, List[str]] parse_args (self, List[str] args)
 
int main (self, List[str] args)
 
- Public Member Functions inherited from CommandContextMixIn
Generator[None, None, Nonemain_context (self)
 
_T enter_context (self, ContextManager[_T] context_provider)
 

Data Fields

 cmd_opts
 
- Data Fields inherited from Command
 name
 
 summary
 
 parser
 
 cmd_opts
 
 tempdir_registry
 
 verbosity
 

Static Public Attributes

str usage
 
tuple log_streams = ("ext://sys.stderr", "ext://sys.stderr")
 
- Static Public Attributes inherited from Command
str usage = ""
 
bool ignore_require_venv = False
 

Additional Inherited Members

- Protected Member Functions inherited from Command
int _main (self, List[str] args)
 
- Protected Attributes inherited from CommandContextMixIn
 _in_main_context
 
 _main_context
 

Detailed Description

Output installed packages in requirements format.

packages are listed in a case-insensitive sorted order.

Definition at line 25 of file freeze.py.

Member Function Documentation

◆ add_options()

None add_options (   self)

Reimplemented from Command.

Definition at line 36 of file freeze.py.

36 def add_options(self) -> None:
37 self.cmd_opts.add_option(
38 "-r",
39 "--requirement",
40 dest="requirements",
41 action="append",
42 default=[],
43 metavar="file",
44 help=(
45 "Use the order in the given requirements file and its "
46 "comments when generating output. This option can be "
47 "used multiple times."
48 ),
49 )
50 self.cmd_opts.add_option(
51 "-l",
52 "--local",
53 dest="local",
54 action="store_true",
55 default=False,
56 help=(
57 "If in a virtualenv that has global access, do not output "
58 "globally-installed packages."
59 ),
60 )
61 self.cmd_opts.add_option(
62 "--user",
63 dest="user",
64 action="store_true",
65 default=False,
66 help="Only output packages installed in user-site.",
67 )
68 self.cmd_opts.add_option(cmdoptions.list_path())
69 self.cmd_opts.add_option(
70 "--all",
71 dest="freeze_all",
72 action="store_true",
73 help=(
74 "Do not skip these packages in the output:"
75 " {}".format(", ".join(_dev_pkgs()))
76 ),
77 )
78 self.cmd_opts.add_option(
79 "--exclude-editable",
80 dest="exclude_editable",
81 action="store_true",
82 help="Exclude editable package from output.",
83 )
84 self.cmd_opts.add_option(cmdoptions.list_exclude())
85
86 self.parser.insert_option_group(0, self.cmd_opts)
87
for i

References pip._internal.commands.freeze._dev_pkgs(), Command.cmd_opts, CacheCommand.cmd_opts, CompletionCommand.cmd_opts, ConfigurationCommand.cmd_opts, DebugCommand.cmd_opts, DownloadCommand.cmd_opts, FreezeCommand.cmd_opts, HashCommand.cmd_opts, IndexCommand.cmd_opts, InspectCommand.cmd_opts, InstallCommand.cmd_opts, ListCommand.cmd_opts, SearchCommand.cmd_opts, ShowCommand.cmd_opts, UninstallCommand.cmd_opts, WheelCommand.cmd_opts, and i.

Here is the call graph for this function:

◆ run()

int run (   self,
Values  options,
List[str]  args 
)

Reimplemented from Command.

Definition at line 88 of file freeze.py.

88 def run(self, options: Values, args: List[str]) -> int:
89 skip = set(stdlib_pkgs)
90 if not options.freeze_all:
91 skip.update(_dev_pkgs())
92
95
97
98 for line in freeze(
99 requirement=options.requirements,
100 local_only=options.local,
101 user_only=options.user,
102 paths=options.path,
103 isolated=options.isolated_mode,
104 skip=skip,
105 exclude_editable=options.exclude_editable,
106 ):
107 sys.stdout.write(line + "\n")
108 return SUCCESS

References pip._internal.commands.freeze._dev_pkgs(), and i.

Here is the call graph for this function:

Field Documentation

◆ cmd_opts

◆ log_streams

tuple log_streams = ("ext://sys.stderr", "ext://sys.stderr")
static

Definition at line 34 of file freeze.py.

◆ usage

str usage
static
Initial value:
= """
%prog [options]"""

Definition at line 32 of file freeze.py.


The documentation for this class was generated from the following file: