σ β\e[c@@sddlmZddlZddlZddlmZddlmZddlm Z ddl m Z ddl m Z ddlmZdd lmZdd lmZdd lmZdd lmZmZdd lmZejeƒZdefd„ƒYZdS(i(tabsolute_importN(t cmdoptions(tRequirementCommand(t CommandError(t FormatControl(tRequirementPreparer(tRequirementSet(tRequirementTracker(tResolver(tcheck_path_owner(t ensure_dirtnormalize_path(t TempDirectorytDownloadCommandcB@s2eZdZdZdZdZd„Zd„ZRS(sL Download packages from: - PyPI (and other indexes) using requirement specifiers. - VCS project urls. - Local project directories. - Local or remote source archives. pip also supports downloading from "requirements files", which provide an easy way to specify a whole environment to be downloaded. tdownloads %prog [options] [package-index-options] ... %prog [options] -r [package-index-options] ... %prog [options] ... %prog [options] ... %prog [options] ...sDownload packages.c O@s3tt|ƒj||Ž|j}|jtjƒƒ|jtjƒƒ|jtjƒƒ|jtj ƒƒ|jtj ƒƒ|jtj ƒƒ|jtj ƒƒ|jtj ƒƒ|jtjƒƒ|jtjƒƒ|jtjƒƒ|jtjƒƒ|jtjƒƒ|jtjƒƒ|jddddddddd tjd d ƒ|jd dd dd d dd dƒ|jdddddd dd dƒ|jdddddd dd dƒ|jdddddd dd dƒtjtj|jƒ}|jjd|ƒ|jjd|ƒdS(Ns-ds--dests--destination-dirs--destination-directorytdestt download_dirtmetavartdirtdefaultthelpsDownload packages into .s --platformtplatforms`Only download wheels compatible with . Defaults to the platform of the running system.s--python-versiontpython_versions&Only download wheels compatible with Python interpreter version . If not specified, then the current system interpreter minor version is used. A major version (e.g. '2') can be specified to match all minor revs of that major version. A minor version (e.g. '34') can also be specified.s--implementationtimplementationsηOnly download wheels compatible with Python implementation , e.g. 'pp', 'jy', 'cp', or 'ip'. If not specified, then the current interpreter implementation is used. Use 'py' to force implementation-agnostic wheels.s--abitabisφOnly download wheels compatible with Python abi , e.g. 'pypy_41'. If not specified, then the current interpreter abi tag is used. Generally you will need to specify --implementation, --platform, and --python-version when using this option.i(tsuperR t__init__tcmd_optst add_optionRt constraintst requirementst build_dirtno_depstglobal_optionst no_binaryt only_binaryt prefer_binarytsrctpretno_cleantrequire_hashest progress_bartno_build_isolationtostcurdirtNonetmake_option_groupt index_grouptparsertinsert_option_group(tselftargstkwRt index_opts((s>/tmp/pip-install-0xiv62/pip/pip/_internal/commands/download.pyR,sf   c#C@sΥt|_g|_|jr*|jg}nd}t|j|j|j|jgƒ}t t ƒdhƒ}|j |ko|j }|r|rt dƒ‚ntjj|jƒ|_t|jƒ|_t|jƒ|j|ƒμ}|jd|d|d|jd|d|jd|jƒ}|jp.|j } |jrjt|jƒ rjtjd |jƒd|_ntƒV} t|jd | d d ƒ2} td |j ƒ} |j!| |||||j"dƒt#d| jd|jd|jddd|j$d|j%d| ƒ} t&d| d|d|dddt'dddt'd|j dt'dtd|j(ƒ }|j)| ƒd j*g| j+D]}|j"^qxƒ}|r©tj,d!|ƒn|jsΏ| j-ƒnWdQXWdQXWdQX| S("Ns:all:sςWhen restricting platform and interpreter constraints using --python-version, --platform, --abi, or --implementation, either --no-deps must be set, or --only-binary=:all: must be set and --no-binary must not be set (or must be set to :none:).toptionstsessionRtpython_versionsRRsέThe directory '%s' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.tdeletetkindRR(Rtsrc_dirRtwheel_download_dirR)tbuild_isolationt req_trackertpreparertfindert wheel_cachet use_user_sitetupgrade_strategysto-satisfy-onlytforce_reinstalltignore_dependenciestignore_requires_pythontignore_installedtisolatedt sSuccessfully downloaded %s(.tTrueRGt editablesRR-tanyRRRRtsettformat_controlRERR+tpathtabspathR;R RR t_build_sessiont_build_package_finderR'Rt cache_dirR tloggertwarningRR RR(tpopulate_requirement_settnameRR)R=RtFalset isolated_modetresolvetjointsuccessfully_downloadedtinfot cleanup_files(R2R6R3R8tdist_restriction_sett binary_onlytno_sdist_dependenciesR7R@t build_deleteR>t directorytrequirement_setR?tresolvertreqt downloaded((s>/tmp/pip-install-0xiv62/pip/pip/_internal/commands/download.pytruns–                        " (t__name__t __module__t__doc__RWtusagetsummaryRRh(((s>/tmp/pip-install-0xiv62/pip/pip/_internal/commands/download.pyR s   S(t __future__RtloggingR+t pip._internalRtpip._internal.basecommandRtpip._internal.exceptionsRtpip._internal.indexRt pip._internal.operations.prepareRtpip._internal.reqRtpip._internal.req.req_trackerRtpip._internal.resolveRtpip._internal.utils.filesystemR tpip._internal.utils.miscR R tpip._internal.utils.temp_dirR t getLoggerRiRTR (((s>/tmp/pip-install-0xiv62/pip/pip/_internal/commands/download.pyts