๓ •abc@@sฅdZddlmZddlmZddlmZmZmZddl Z ddl m Z m Z m Z mZddlmZddlmZmZdd lmZd „Zd „Zdd „Zeed dddddddƒZeeddddddeddƒZeedddddddedeƒZeeddddddddddƒZeed d!dd"dddd#ƒZeed$d%dd&dddddd'ƒZ eed(d)d*dd+d,d-dd.ƒZ!eed/dd0dddedeƒZ"eed1dd2d3d4dd5dd6ƒZ#eed7dd8d3d9dd:dd;ƒZ$eed<d=d,d>dd?d3d@ddAddBƒZ%eedCddDd3d4dd5deƒZ&eedEddFd3d4dd5deƒZ'dG„Z(eedHddId3d4d,d-ddJƒZ)eedKddLd3d4ddd,d-ddMƒZ*eedNdOdPddQd,dRdej+ddSƒZ,dT„Z-eedUddVdddeddWƒZ.dX„Z/dY„Z0eedZdd[dddedeƒZ1d\„Z2eed]dd[dd^dedeƒZ3d_„Z4eed`ddadd^dedeƒZ5eedbddcdddedddƒZ6de„Z7df„Z8dg„Z9eedhdidjdkddld,dmdeddnƒZ:eedoddpddde;deƒZ<eedqddpdd^de;ddrƒZ=ds„Z>dt„Z?du„Z@dv„ZAdw„ZBeedxddyded,dmddzƒZCeed{ddydd^dd|ƒZDeed}d~dddddedd€ƒZEeedd‚dƒd„dd…d,dmdd†ƒZFeed‡ddˆdddd‰ƒZGeedŠdd‹ddŒd,dddŽƒZHeedddddŒd,ddd‘ƒZIeed’dddedd“ƒZJeed”dddedd•ƒZKeed–dd—dddedd˜ƒZLeed™dšdd›dddeƒZMdœ„ZNeedddžddŸdŸeNd3d ddกƒZOeedขddฃdddeddคƒZPidฅdฆ6eeeeee e!e"e#e$e%e&e'e(e2e)e*eCeDeLgd6ZQidงdฆ6e,e-e.e/e6gd6ZRidจdฆ6eRde0e1e3e4e5gd6ZSdS(ฉsD 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. i(tabsolute_import(tpartial(t OptionGroupt SUPPRESS_HELPtOptionN(t FormatControltfmt_ctl_handle_mutual_excludetfmt_ctl_no_binarytfmt_ctl_no_use_wheel(tPyPI(tUSER_CACHE_DIRt src_prefix(t STRONG_HASHEScC@s<t||dƒ}x"|dD]}|j|ƒƒqW|S(s‡ Return an OptionGroup object group -- assumed to be dict with 'name' and 'options' keys parser -- an optparse Parser tnametoptions(Rt add_option(tgrouptparsert option_grouptoption((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pytmake_option_groupscC@s#|js|j}t|ƒndS(N(t use_wheeltformat_controlR(Rtcontrol((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pytresolve_wheel_no_use_binary$s  c@suˆdkr|‰n‡fd†}dddg}tt||ƒƒrq|j}t|ƒtjdddƒndS( sฯDisable 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. c@stˆ|dƒS(N(tgetattrtNone(tn(t check_options(s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pytgetname4st build_optionstglobal_optionstinstall_optionsseDisabling all use of wheels due to the use of --build-options / --global-options / --install-options.t stackleveliN(RtanytmapRRtwarningstwarn(RRRtnamesR((Rs2/usr/lib/python2.7/site-packages/pip/cmdoptions.pytcheck_install_build_global*s    s-hs--helptdestthelptactions Show help.s --isolatedt isolated_modet store_truetdefaultsSRun pip in an isolated mode, ignoring environment variables and user configuration.s--require-virtualenvs--require-venvt require_venvs-vs --verbosetverbosetcountsDGive more output. Option is additive, and can be used up to 3 times.s-Vs --versiontversionsShow version and exit.s-qs--quiettquietsƒGive less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).s--logs --log-files --local-logtlogtmetavartpaths Path to a verbose appending log.s --no-inputtno_inputs--proxytproxyttypetstrts<Specify a proxy in the form [user:passwd@]proxy.server:port.s --retriestretriestintisRMaximum number of retries each connection should attempt (default %default times).s --timeouts--default-timeouttsecttimeouttfloatis2Set the socket timeout (default %default seconds).s --default-vcst default_vcss--skip-requirements-regextskip_requirements_regexcC@sCtddddddddd d d gd gd ddd ddƒS(Ns--exists-actionR(t exists_actionR8tchoicetchoiceststitwtbtaR-R*tappendR4R)sYDefault action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.(R(((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pyRBธss--certtcertsPath to alternate CA bundle.s --client-certt client_certskPath to SSL client certificate, a single file containing the private key and the certificate in PEM format.s-is --index-urls --pypi-urlt index_urltURLsปBase URL of Python Package Index (default %default). This should point to a repository compliant with PEP 503 (the simple repository API) or a local directory laid out in the same format.c C@s(tddddddddgd d ƒS( Ns--extra-index-urlR(textra_index_urlsR4RNR*RJR-R)smExtra URLs of package indexes to use in addition to --index-url. Should follow the same rules as --index-url.(R(((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pytextra_index_urlไss --no-indextno_indexsAIgnore package index (only looking at --find-links URLs instead).c C@s+tdddddddgdd d d ƒS( Ns-fs --find-linksR(t find_linksR*RJR-R4turlR)sงIf a url or path to an html file, then parse for links to archives. If a local path or file:// url that's a directory, then look for archives in the directory listing.(R(((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pyRR๚s c C@s(tddddddgddd tƒS( Ns--allow-externalR(tallow_externalR*RJR-R4tPACKAGER)(RR(((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pyRTss--allow-all-externaltallow_all_externalc C@s(tddddddddgd d ƒS( Ns--trusted-hostR(t trusted_hostsR*RJR4tHOSTNAMER-R)sKMark this host as trusted, even though it does not have valid or any HTTPS.(R(((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pyt trusted_hostss--no-allow-externalt store_falsec C@s+tdddddddgdd d tƒS( Ns--allow-unverifieds--allow-insecureR(tallow_unverifiedR*RJR-R4RUR)(RR(((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pyt allow_unsafe3s s--no-allow-insecuretallow_all_insecures--process-dependency-linkstprocess_dependency_linkss*Enable the processing of dependency links.c C@s+tdddddddgdd d d ƒS( Ns-cs --constraintR(t constraintsR*RJR-R4tfileR)s\Constrain versions using the given constraints file. This option can be used multiple times.(R(((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pyR_Rs c C@s+tdddddddgdd d d ƒS( Ns-rs --requirementR(t requirementsR*RJR-R4R`R)sQInstall from the given requirements file. This option can be used multiple times.(R(((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pyRa]s c C@s+tdddddddgdd d d ƒS( Ns-es --editableR(t editablesR*RJR-R4spath/urlR)skInstall a project in editable mode (i.e. setuptools "develop mode") from a local project path or a VCS url.(R(((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pyteditablehs s--srcs--sources --source-dirs--source-directorytsrc_dirtdirs˜Directory to check out editable projects into. The default in a virtualenv is "/src". The default for global installs is "/src".s --use-wheelRs--no-use-wheels{Do not Find and prefer wheel archives when searching indexes and find-links locations. DEPRECATED in favour of --no-binary.cC@st||jƒS(sGet a format_control object.(RR((tvaluesR((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pyt_get_format_control”scC@s/t|j|jƒ}t||j|jƒdS(N(RRfR(Rt no_binaryt only_binary(Rtopt_strtvalueRtexisting((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pyt_handle_no_binary™scC@s/t|j|jƒ}t||j|jƒdS(N(RRfR(RRiRh(RRjRkRRl((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pyt_handle_only_binaryŸscC@s=tddddddtdddttƒtƒƒd d ƒS( Ns --no-binaryR(RR*tcallbackR8R9R-R)sRDo not use binary packages. Can be supplied multiple times, and each time adds to the existing value. Accepts either :all: to disable all binary packages, :none: to empty the set, or one or more package names with commas between them. Note that some packages are tricky to compile and may fail to install when this option is used on them.(RRmRtset(((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pyRhฅs  cC@s=tddddddtdddttƒtƒƒd d ƒS( Ns --only-binaryR(RR*RoR8R9R-R)sGDo not use source packages. Can be supplied multiple times, and each time adds to the existing value. Accepts either :all: to disable all source packages, :none: to empty the set, or one or more package names with commas between them. Packages without binary distributions will fail to install when this option is used on them.(RRnRRp(((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pyRiฒs  s --cache-dirt cache_dirsStore the cache data in .s--no-cache-dirsDisable the cache.s --no-depss--no-dependenciestignore_dependenciess#Don't install package dependencies.s-bs--builds --build-dirs--build-directoryt build_dirs/Directory to unpack packages into and build in.s--ignore-requires-pythontignore_requires_pythons'Ignore the Requires-Python information.s--install-optionR RJRs"Extra arguments to be supplied to the setup.py install command (use like --install-option="--install-scripts=/usr/local/bin"). Use multiple --install-option options to pass multiple options to setup.py install. If you are using an option with a directory path, be sure to use absolute path.s--global-optionRsTExtra global options to be supplied to the setup.py call before the install command.s --no-cleans!Don't clean up build directories.s--presYInclude pre-release and development versions. By default, pip only finds stable versions.s--disable-pip-version-checktdisable_pip_version_checks{Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.s-Zs--always-unzipt always_unzipcC@sฎ|jjsi|j_ny|jddƒ\}}Wn"tk r[|jd|ƒnX|tkr‹|jd|djtƒfƒn|jjj|gƒj|ƒdS(skGiven a value spelled "algo:digest", append the digest to a list pointed to in a dict by the algo name.t:isTArguments to %s must be a hash name followed by a value, like --hash=sha256:abcde...s&Allowed hash algorithms for %s are %s.s, N( Rfthashestsplitt ValueErrorterrorR tjoint setdefaultRJ(RRjRkRtalgotdigest((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pyt _merge_hashs      s--hashRxRotstringsgVerify that the package's archive matches this hash before installing. Example: --hash=sha256:abcdef...s--require-hashestrequire_hashessžRequire a hash to check each requirement against, for repeatable installs. This option is implied when any package in a requirements file has a --hash option.sGeneral OptionsR sPackage Index Optionss4Package Index Options (including deprecated options)(Tt__doc__t __future__Rt functoolsRtoptparseRRRR$t pip.indexRRRRt pip.modelsR t pip.locationsR R tpip.utils.hashesR RRRR'thelp_tFalseR+trequire_virtualenvR/R1R2R3R6R7R;R>R@RARBRKRLt simple_urlRMRPRQRRRTRVRYtno_allow_externalR\tno_allow_unsafeR^R_RaRctsrctTrueRt no_use_wheelRgRmRnRhRiRqtno_cachetno_depsRsRtR Rtno_cleantpreRuRvR€thashR‚t general_grouptnon_deprecated_index_groupt index_group(((s2/usr/lib/python2.7/site-packages/pip/cmdoptions.pyt sx "