Viewing File: /usr/lib/python3.6/site-packages/pip/__pycache__/cmdoptions.cpython-36.pyc
3
ajZ@ @ sn d Z ddlmZ ddlmZ ddlmZmZmZ ddl Z ddl
mZmZm
Z
mZ ddlmZ ddlmZmZ dd lmZ d
d Zdd
ZdddZeeddddddZeeddddddZeedddddedZeeddd d!dd"dZeed#d$d%dd&dZeed'd(d)d!dd*dZeed+d,d-d.d/d0d1Zeed2d3ddedZ eed4d5d6d7d8d9Z!eed:d;d<d=d>d9Z"eed?d@dAdBdCdDdEdFZ#eedGdHd6d7ed9Z$eedIdJd6d7ed9Z%dKdL Z&eedMdNd6d/dOdPZ'eedQdRd6dd/dSdTZ(eedUdVdWdXdYej)dZd[Z*d\d] Z+eed^d_ddd`dZ,dadb Z-dcdd Z.eededfddedZ/dgdh Z0eedidfdjdedZ1dkdl Z2eedmdndjdedZ3eedodpdddqdZ4drds Z5dtdu Z6dvdw Z7eedxdydzd{d|d}ed~d[ Z8eeddddedZ9eedddjdddZ:dd Z;dd Z<dd Z=dd Z>dd Z?eedded}ddZ@eedddjddZAeedddddddZBeedddddd}dd1ZCeedddddZDeeddddddZEeeddddddZFeedddddZGeedddddZHeeddddddZIeeddddedZJdd ZKeedddeKdddZLeeddddddZMdeeeeeeee e!e"e#e$e%e&e0e'e(e@eAeIgdZNde*e+e,e-e4gdZOdeOd e.e/e1e2e3g dZPdS )aD
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.
)absolute_import)partial)OptionGroup
SUPPRESS_HELPOptionN)
FormatControlfmt_ctl_handle_mutual_excludefmt_ctl_no_binaryfmt_ctl_no_use_wheel)PyPI)USER_CACHE_DIR
src_prefix)
STRONG_HASHESc C s0 t || d }x| d D ]}|j| qW |S )z
Return an OptionGroup object
group -- assumed to be dict with 'name' and 'options' keys
parser -- an optparse Parser
nameoptions)r Z
add_option)groupparserZoption_groupoption r /usr/lib/python3.6/cmdoptions.pymake_option_group s r c C s | j s| j}t| d S )N) use_wheelformat_controlr
)r controlr r r resolve_wheel_no_use_binary$ s r c sP dkr| fdd}dddg}t t||rL| j}t| tjddd dS )
zDisable wheels if per-setup.py call options are set.
:param options: The OptionParser options to update.
:param check_options: The options to check, if not supplied defaults to
options.
Nc s t | d S )N)getattr)n)
check_optionsr r getname4 s z+check_install_build_global.<locals>.getnameZ
build_optionsglobal_optionsinstall_optionszeDisabling all use of wheels due to the use of --build-options / --global-options / --install-options. )
stacklevel)anymapr r warningswarn)r r r namesr r )r r check_install_build_global* s
r( z-hz--helphelpz
Show help.)destactionr) z
--isolated
isolated_mode
store_trueFzSRun pip in an isolated mode, ignoring environment variables and user configuration.)r* r+ defaultr) z--require-virtualenvz--require-venvZrequire_venvz-vz --verboseverbosecountzDGive more output. Option is additive, and can be used up to 3 times.z-Vz --versionversionzShow version and exit.z-qz--quietquietzGive less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).z--logz
--log-filez--local-loglogpathz Path to a verbose appending log.)r* metavarr) z
--no-inputno_inputz--proxyproxystr z<Specify a proxy in the form [user:passwd@]proxy.server:port.)r* typer. r) z --retriesretriesint zRMaximum number of retries each connection should attempt (default %default times).z --timeoutz--default-timeoutZsectimeoutfloat z2Set the socket timeout (default %default seconds).)r5 r* r: r. r) z
--default-vcsdefault_vcsz--skip-requirements-regexskip_requirements_regexc
C s"