Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Classes | Functions | Variables
pip._internal.cli.cmdoptions Namespace Reference

Classes

class  PipOption
 

Functions

None raise_option_error (OptionParser parser, Option option, str msg)
 
OptionGroup make_option_group (Dict[str, Any] group, ConfigOptionParser parser)
 
None check_dist_restriction (Values options, bool check_target=False)
 
str _path_option_check (Option option, str opt, str value)
 
str _package_name_option_check (Option option, str opt, str value)
 
Option exists_action ()
 
Option extra_index_url ()
 
Option find_links ()
 
Option trusted_host ()
 
Option constraints ()
 
Option requirements ()
 
Option editable ()
 
None _handle_src (Option option, str opt_str, str value, OptionParser parser)
 
Any _get_format_control (Values values, Option option)
 
None _handle_no_binary (Option option, str opt_str, str value, OptionParser parser)
 
None _handle_only_binary (Option option, str opt_str, str value, OptionParser parser)
 
Option no_binary ()
 
Option only_binary ()
 
Tuple[Tuple[int,...], Optional[str]] _convert_python_version (str value)
 
None _handle_python_version (Option option, str opt_str, str value, OptionParser parser)
 
None add_target_python_options (OptionGroup cmd_opts)
 
TargetPython make_target_python (Values options)
 
Option prefer_binary ()
 
None _handle_no_cache_dir (Option option, str opt, str value, OptionParser parser)
 
None _handle_no_use_pep517 (Option option, str opt, str value, OptionParser parser)
 
None _handle_config_settings (Option option, str opt_str, str value, OptionParser parser)
 
None _handle_merge_hash (Option option, str opt_str, str value, OptionParser parser)
 
None check_list_path_option (Values options)
 

Variables

 logger = logging.getLogger(__name__)
 
Callable cert
 
Callable client_cert
 
Callable index_url
 
Callable no_index
 
Callable src
 
Callable platforms
 
Callable python_version
 
Callable implementation
 
Callable abis
 
Callable cache_dir
 
Callable no_cache
 
Callable no_deps
 
Callable ignore_requires_python
 
Callable no_build_isolation
 
Callable check_build_deps
 
Any use_pep517
 
Any no_use_pep517
 
Callable config_settings
 
Callable build_options
 
Callable global_options
 
Callable no_clean
 
Callable pre
 
Callable disable_pip_version_check
 
Callable root_user_action
 
Callable hash
 
Callable require_hashes
 
Callable list_path
 
Callable list_exclude
 
Callable no_python_version_warning
 
list ALWAYS_ENABLED_FEATURES
 
Callable use_new_feature
 
Callable use_deprecated_feature
 
dict general_group
 groups #
 
dict index_group
 

Detailed Description

shared options and groups

The principle here is to define options once, but *not* instantiate them
globally. One reason being that options with action='append' can carry state
between parses. pip parses general options twice internally, and shouldn't
pass on state. To be consistent, all options will follow this design.

Function Documentation

◆ _convert_python_version()

Tuple[Tuple[int, ...], Optional[str]] pip._internal.cli.cmdoptions._convert_python_version ( str  value)
protected
Convert a version string like "3", "37", or "3.7.3" into a tuple of ints.

:return: A 2-tuple (version_info, error_msg), where `error_msg` is
    non-None if and only if there was a parsing error.

◆ _get_format_control()

Any pip._internal.cli.cmdoptions._get_format_control ( Values  values,
Option  option 
)
protected
Get a format_control object.

◆ _handle_merge_hash()

None pip._internal.cli.cmdoptions._handle_merge_hash ( Option  option,
str  opt_str,
str  value,
OptionParser   parser 
)
protected
Given a value spelled "algo:digest", append the digest to a list
pointed to in a dict by the algo name.

◆ _handle_no_cache_dir()

None pip._internal.cli.cmdoptions._handle_no_cache_dir ( Option  option,
str  opt,
str  value,
OptionParser   parser 
)
protected
Process a value provided for the --no-cache-dir option.

This is an optparse.Option callback for the --no-cache-dir option.

◆ _handle_no_use_pep517()

None pip._internal.cli.cmdoptions._handle_no_use_pep517 ( Option  option,
str  opt,
str  value,
OptionParser   parser 
)
protected
Process a value provided for the --no-use-pep517 option.

This is an optparse.Option callback for the no_use_pep517 option.

◆ _handle_python_version()

None pip._internal.cli.cmdoptions._handle_python_version ( Option  option,
str  opt_str,
str  value,
OptionParser   parser 
)
protected
Handle a provided --python-version value.

◆ check_dist_restriction()

None pip._internal.cli.cmdoptions.check_dist_restriction ( Values  options,
bool   check_target = False 
)
Function for determining if custom platform options are allowed.

:param options: The OptionParser options.
:param check_target: Whether or not to check if --target is being used.

◆ make_option_group()

OptionGroup pip._internal.cli.cmdoptions.make_option_group ( Dict[str, Any]  group,
ConfigOptionParser  parser 
)
Return an OptionGroup object
group  -- assumed to be dict with 'name' and 'options' keys
parser -- an optparse Parser

◆ raise_option_error()

None pip._internal.cli.cmdoptions.raise_option_error ( OptionParser  parser,
Option  option,
str  msg 
)
Raise an option parsing error using parser.error().

Args:
  parser: an OptionParser instance.
  option: an Option instance.
  msg: the error text.

Variable Documentation

◆ abis

Callable pip._internal.cli.cmdoptions.abis
Initial value:
1= partial(
2 Option,
3 "--abi",
4 dest="abis",
5 metavar="abi",
6 action="append",
7 default=None,
8 help=(
9 "Only use wheels compatible with Python abi <abi>, e.g. 'pypy_41'. "
10 "If not specified, then the current interpreter abi tag is used. "
11 "Use this option multiple times to specify multiple abis supported "
12 "by the target interpreter. Generally you will need to specify "
13 "--implementation, --platform, and --python-version when using this "
14 "option."
15 ),
16)

◆ ALWAYS_ENABLED_FEATURES

list pip._internal.cli.cmdoptions.ALWAYS_ENABLED_FEATURES
Initial value:
1= [
2 "no-binary-enable-wheel-cache", # always on since 23.1
3]

◆ build_options

Callable pip._internal.cli.cmdoptions.build_options
Initial value:
1= partial(
2 Option,
3 "--build-option",
4 dest="build_options",
5 metavar="options",
6 action="append",
7 help="Extra arguments to be supplied to 'setup.py bdist_wheel'.",
8)

◆ cache_dir

Callable pip._internal.cli.cmdoptions.cache_dir
Initial value:
1= partial(
2 PipOption,
3 "--cache-dir",
4 dest="cache_dir",
5 default=USER_CACHE_DIR,
6 metavar="dir",
7 type="path",
8 help="Store the cache data in <dir>.",
9)

◆ cert

Callable pip._internal.cli.cmdoptions.cert
Initial value:
1= partial(
2 PipOption,
3 "--cert",
4 dest="cert",
5 type="path",
6 metavar="path",
7 help=(
8 "Path to PEM-encoded CA certificate bundle. "
9 "If provided, overrides the default. "
10 "See 'SSL Certificate Verification' in pip documentation "
11 "for more information."
12 ),
13)

◆ check_build_deps

Callable pip._internal.cli.cmdoptions.check_build_deps
Initial value:
1= partial(
2 Option,
3 "--check-build-dependencies",
4 dest="check_build_deps",
5 action="store_true",
6 default=False,
7 help="Check the build dependencies when PEP517 is used.",
8)

◆ client_cert

Callable pip._internal.cli.cmdoptions.client_cert
Initial value:
1= partial(
2 PipOption,
3 "--client-cert",
4 dest="client_cert",
5 type="path",
6 default=None,
7 metavar="path",
8 help="Path to SSL client certificate, a single file containing the "
9 "private key and the certificate in PEM format.",
10)

◆ config_settings

Callable pip._internal.cli.cmdoptions.config_settings
Initial value:
1= partial(
2 Option,
3 "-C",
4 "--config-settings",
5 dest="config_settings",
6 type=str,
7 action="callback",
8 callback=_handle_config_settings,
9 metavar="settings",
10 help="Configuration settings to be passed to the PEP 517 build backend. "
11 "Settings take the form KEY=VALUE. Use multiple --config-settings options "
12 "to pass multiple keys to the backend.",
13)

◆ disable_pip_version_check

Callable pip._internal.cli.cmdoptions.disable_pip_version_check
Initial value:
1= partial(
2 Option,
3 "--disable-pip-version-check",
4 dest="disable_pip_version_check",
5 action="store_true",
6 default=True,
7 help="Don't periodically check PyPI to determine whether a new version "
8 "of pip is available for download. Implied with --no-index.",
9)

◆ general_group

dict pip._internal.cli.cmdoptions.general_group
Initial value:
1= {
2 "name": "General Options",
3 "options": [
4 help_,
5 debug_mode,
6 isolated_mode,
7 require_virtualenv,
8 python,
9 verbose,
10 version,
11 quiet,
12 log,
13 no_input,
14 keyring_provider,
15 proxy,
16 retries,
17 timeout,
18 exists_action,
19 trusted_host,
20 cert,
21 client_cert,
22 cache_dir,
23 no_cache,
24 disable_pip_version_check,
25 no_color,
26 no_python_version_warning,
27 use_new_feature,
28 use_deprecated_feature,
29 ],
30}

groups #

◆ global_options

Callable pip._internal.cli.cmdoptions.global_options
Initial value:
1= partial(
2 Option,
3 "--global-option",
4 dest="global_options",
5 action="append",
6 metavar="options",
7 help="Extra global options to be supplied to the setup.py "
8 "call before the install or bdist_wheel command.",
9)

◆ hash

Callable pip._internal.cli.cmdoptions.hash
Initial value:
1= partial(
2 Option,
3 "--hash",
4 # Hash values eventually end up in InstallRequirement.hashes due to
5 # __dict__ copying in process_line().
6 dest="hashes",
7 action="callback",
8 callback=_handle_merge_hash,
9 type="string",
10 help="Verify that the package's archive matches this "
11 "hash before installing. Example: --hash=sha256:abcdef...",
12)

◆ ignore_requires_python

Callable pip._internal.cli.cmdoptions.ignore_requires_python
Initial value:
1= partial(
2 Option,
3 "--ignore-requires-python",
4 dest="ignore_requires_python",
5 action="store_true",
6 help="Ignore the Requires-Python information.",
7)

◆ implementation

Callable pip._internal.cli.cmdoptions.implementation
Initial value:
1= partial(
2 Option,
3 "--implementation",
4 dest="implementation",
5 metavar="implementation",
6 default=None,
7 help=(
8 "Only use wheels compatible with Python "
9 "implementation <implementation>, e.g. 'pp', 'jy', 'cp', "
10 " or 'ip'. If not specified, then the current "
11 "interpreter implementation is used. Use 'py' to force "
12 "implementation-agnostic wheels."
13 ),
14)

◆ index_group

dict pip._internal.cli.cmdoptions.index_group
Initial value:
1= {
2 "name": "Package Index Options",
3 "options": [
4 index_url,
5 extra_index_url,
6 no_index,
7 find_links,
8 ],
9}

◆ index_url

Callable pip._internal.cli.cmdoptions.index_url
Initial value:
1= partial(
2 Option,
3 "-i",
4 "--index-url",
5 "--pypi-url",
6 dest="index_url",
7 metavar="URL",
8 default=PyPI.simple_url,
9 help="Base URL of the Python Package Index (default %default). "
10 "This should point to a repository compliant with PEP 503 "
11 "(the simple repository API) or a local directory laid out "
12 "in the same format.",
13)

◆ list_exclude

Callable pip._internal.cli.cmdoptions.list_exclude
Initial value:
1= partial(
2 PipOption,
3 "--exclude",
4 dest="excludes",
5 action="append",
6 metavar="package",
7 type="package_name",
8 help="Exclude specified package from the output",
9)

◆ list_path

Callable pip._internal.cli.cmdoptions.list_path
Initial value:
1= partial(
2 PipOption,
3 "--path",
4 dest="path",
5 type="path",
6 action="append",
7 help="Restrict to the specified installation path for listing "
8 "packages (can be used multiple times).",
9)

◆ no_build_isolation

Callable pip._internal.cli.cmdoptions.no_build_isolation
Initial value:
1= partial(
2 Option,
3 "--no-build-isolation",
4 dest="build_isolation",
5 action="store_false",
6 default=True,
7 help="Disable isolation when building a modern source distribution. "
8 "Build dependencies specified by PEP 518 must be already installed "
9 "if this option is used.",
10)

◆ no_cache

Callable pip._internal.cli.cmdoptions.no_cache
Initial value:
1= partial(
2 Option,
3 "--no-cache-dir",
4 dest="cache_dir",
5 action="callback",
6 callback=_handle_no_cache_dir,
7 help="Disable the cache.",
8)

◆ no_clean

Callable pip._internal.cli.cmdoptions.no_clean
Initial value:
1= partial(
2 Option,
3 "--no-clean",
4 action="store_true",
5 default=False,
6 help="Don't clean up build directories.",
7)

◆ no_deps

Callable pip._internal.cli.cmdoptions.no_deps
Initial value:
1= partial(
2 Option,
3 "--no-deps",
4 "--no-dependencies",
5 dest="ignore_dependencies",
6 action="store_true",
7 default=False,
8 help="Don't install package dependencies.",
9)

◆ no_index

Callable pip._internal.cli.cmdoptions.no_index
Initial value:
1= partial(
2 Option,
3 "--no-index",
4 dest="no_index",
5 action="store_true",
6 default=False,
7 help="Ignore package index (only looking at --find-links URLs instead).",
8)

◆ no_python_version_warning

Callable pip._internal.cli.cmdoptions.no_python_version_warning
Initial value:
1= partial(
2 Option,
3 "--no-python-version-warning",
4 dest="no_python_version_warning",
5 action="store_true",
6 default=False,
7 help="Silence deprecation warnings for upcoming unsupported Pythons.",
8)

◆ no_use_pep517

Any pip._internal.cli.cmdoptions.no_use_pep517
Initial value:
1= partial(
2 Option,
3 "--no-use-pep517",
4 dest="use_pep517",
5 action="callback",
6 callback=_handle_no_use_pep517,
7 default=None,
8 help=SUPPRESS_HELP,
9)

◆ platforms

Callable pip._internal.cli.cmdoptions.platforms
Initial value:
1= partial(
2 Option,
3 "--platform",
4 dest="platforms",
5 metavar="platform",
6 action="append",
7 default=None,
8 help=(
9 "Only use wheels compatible with <platform>. Defaults to the "
10 "platform of the running system. Use this option multiple times to "
11 "specify multiple platforms supported by the target interpreter."
12 ),
13)

◆ pre

Callable pip._internal.cli.cmdoptions.pre
Initial value:
1= partial(
2 Option,
3 "--pre",
4 action="store_true",
5 default=False,
6 help="Include pre-release and development versions. By default, "
7 "pip only finds stable versions.",
8)

◆ python_version

Callable pip._internal.cli.cmdoptions.python_version
Initial value:
1= partial(
2 Option,
3 "--python-version",
4 dest="python_version",
5 metavar="python_version",
6 action="callback",
7 callback=_handle_python_version,
8 type="str",
9 default=None,
10 help=dedent(
11
12 ),
13)

◆ require_hashes

Callable pip._internal.cli.cmdoptions.require_hashes
Initial value:
1= partial(
2 Option,
3 "--require-hashes",
4 dest="require_hashes",
5 action="store_true",
6 default=False,
7 help="Require a hash to check each requirement against, for "
8 "repeatable installs. This option is implied when any package in a "
9 "requirements file has a --hash option.",
10)

◆ root_user_action

Callable pip._internal.cli.cmdoptions.root_user_action
Initial value:
1= partial(
2 Option,
3 "--root-user-action",
4 dest="root_user_action",
5 default="warn",
6 choices=["warn", "ignore"],
7 help="Action if pip is run as a root user. By default, a warning message is shown.",
8)

◆ src

Callable pip._internal.cli.cmdoptions.src
Initial value:
1= partial(
2 PipOption,
3 "--src",
4 "--source",
5 "--source-dir",
6 "--source-directory",
7 dest="src_dir",
8 type="path",
9 metavar="dir",
10 default=get_src_prefix(),
11 action="callback",
12 callback=_handle_src,
13 help="Directory to check out editable projects into. "
14 'The default in a virtualenv is "<venv path>/src". '
15 'The default for global installs is "<current dir>/src".',
16)

◆ use_deprecated_feature

Callable pip._internal.cli.cmdoptions.use_deprecated_feature
Initial value:
1= partial(
2 Option,
3 "--use-deprecated",
4 dest="deprecated_features_enabled",
5 metavar="feature",
6 action="append",
7 default=[],
8 choices=[
9 "legacy-resolver",
10 ],
11 help=("Enable deprecated functionality, that will be removed in the future."),
12)

◆ use_new_feature

Callable pip._internal.cli.cmdoptions.use_new_feature
Initial value:
1= partial(
2 Option,
3 "--use-feature",
4 dest="features_enabled",
5 metavar="feature",
6 action="append",
7 default=[],
8 choices=[
9 "fast-deps",
10 "truststore",
11 ]
12 + ALWAYS_ENABLED_FEATURES,
13 help="Enable new functionality, that may be backward incompatible.",
14)

◆ use_pep517

Any pip._internal.cli.cmdoptions.use_pep517
Initial value:
1= partial(
2 Option,
3 "--use-pep517",
4 dest="use_pep517",
5 action="store_true",
6 default=None,
7 help="Use PEP 517 for building source distributions "
8 "(use --no-use-pep517 to force legacy behaviour).",
9)