σ •abc@@sΧddlmZddlZddlZddlmZddlmZddlm Z ddl m Z ddl m Z ddlmZmZdd lmZdd lmZejeƒZd e fd „ƒYZdS( i(tabsolute_importN(t CommandError(t FormatControl(tRequirementSet(tRequirementCommand(t cmdoptions(t ensure_dirtnormalize_path(tBuildDirectory(tcheck_path_ownertDownloadCommandcB@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] [-e] ... %prog [options] [-e] ... %prog [options] ...sDownload packages.c O@s tt|ƒj||Ž|j}|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 constraintsteditablet requirementst build_dirtno_depstglobal_optionst no_binaryt only_binarytsrctpretno_cleantrequire_hashestostcurdirtNonetmake_option_grouptnon_deprecated_index_grouptparsertinsert_option_group(tselftargstkwRt index_opts((s9/usr/lib/python2.7/site-packages/pip/commands/download.pyR*sb   c C@sZt|_|jr!|jg}nd}t|j|j|j|jgƒ}tt ƒt dgƒƒ}|rŠ|j |krŠt dƒ‚nt j j|jƒ|_t|jƒ|_t|jƒ|j|ƒ„}|jd|d|d|jd|d|jd|jƒ}|jp|j }|jrWt|jƒ rWtjd |jƒd|_nt|jd |ƒβ} td | d |jd |jdtd|jd|d|jd|jƒ} |j | |||||j!dƒ| j"sζdS| j#|ƒdj$g| j%D]} | j!^qƒ} | r4tj&d| ƒn|jsJ| j'ƒnWdQXWdQX| S(Ns:all:sΠ--only-binary=:all: must be set and --no-binary must not be set (or must be set to :none:) when restricting platform and interpreter constraints using --python-version, --platform, --abi, or --implementation.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.tdeleteRtsrc_dirR tignore_installedtignore_dependenciestisolatedR%t sSuccessfully downloaded %s((tTrueR6RR(tanyRRRRtsettformat_controlRR&tpathtabspathR5RR Rt_build_sessiont_build_package_finderR$Rt cache_dirR tloggertwarningRRR7t isolated_modeR%tpopulate_requirement_settnamethas_requirementst prepare_filestjointsuccessfully_downloadedtinfot cleanup_files( R-R1R.R3tdist_restriction_sett binary_onlyR2tfindert build_deleteRtrequirement_settreqt downloaded((s9/usr/lib/python2.7/site-packages/pip/commands/download.pytrun{sx                   "  (t__name__t __module__t__doc__RGtusagetsummaryRRU(((s9/usr/lib/python2.7/site-packages/pip/commands/download.pyR s   Q(t __future__RtloggingR&tpip.exceptionsRt pip.indexRtpip.reqRtpip.basecommandRtpipRt pip.utilsRRtpip.utils.buildRtpip.utils.filesystemR t getLoggerRVRCR (((s9/usr/lib/python2.7/site-packages/pip/commands/download.pyts