ó •abc@@sŽddlmZddlZddlZddlZddlZddlZddlZddlZddlm Z yddl Z Wne k re Z nXddl mZddlmZddlmZmZddlmZmZmZddlmZdd lmZmZdd lmZdd lm Z dd l!m"Z"dd l#m$Z$m%Z%ej&e'ƒZ(defd„ƒYZ)d„Z*dS(i(tabsolute_importN(tpath(tRequirementSet(tRequirementCommand(tvirtualenv_no_globaltdistutils_scheme(tInstallationErrort CommandErrortPreviousBuildDirError(t cmdoptions(t ensure_dirtget_installed_version(tBuildDirectory(tRemovedInPip10Warning(tcheck_path_owner(t WheelCachet WheelBuildertInstallCommandcB@s2eZdZdZdZdZd„Zd„ZRS(sI Install packages from: - PyPI (and other indexes) using requirement specifiers. - VCS project urls. - Local project directories. - Local or remote source archives. pip also supports installing from "requirements files", which provide an easy way to specify a whole environment to be installed. tinstalls% %prog [options] [package-index-options] ... %prog [options] -r [package-index-options] ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...sInstall packages.c O@sitt|ƒj||Ž|j}|jtjƒƒ|jtjƒƒ|jtjƒƒ|jtj ƒƒ|jdddddddddd ƒ|jd d d d ddddddddƒ|jtj ƒƒ|jddddddddƒ|jddddddddgddƒ|jdddddddƒ|jdd dd!dddd"ƒ|jtj ƒƒ|jtj ƒƒ|jtjƒƒ|jtjƒƒ|jd#dd$dddd%ƒ|jd&dd'dddd(ƒ|jd)dd*dddddd+ƒ|jd,dd-dd.dddd/ƒ|jd0dd1dddddd2ƒ|jd3dddd4dtdd5ƒ|jd6dd7dd4dd8ƒ|jtjƒƒ|jtjƒƒ|jtjƒƒ|jtjƒƒ|jtjƒƒ|jtjƒƒ|jtjƒƒtjtj|jƒ}|jjd9|ƒ|jjd9|ƒdS(:Ns-ts--targettdestt target_dirtmetavartdirtdefaultthelps¥Install packages into . By default this will not replace existing files/folders in . Use --upgrade to replace existing packages in with new versions.s-ds --downloads--download-dirs--download-directoryt download_dirs`Download packages into instead of installing them, regardless of what's already installed.s-Us --upgradetupgradetactiont store_trues‚Upgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.s--upgrade-strategytupgrade_strategyteagertchoicessonly-if-neededs3Determines how dependency upgrading should be handled. "eager" - dependencies are upgraded regardless of whether the currently installed version satisfies the requirements of the upgraded package(s). "only-if-needed" - are upgraded only when they do not satisfy the requirements of the upgraded package(s).s--force-reinstalltforce_reinstallsKWhen upgrading, reinstall all packages even if they are already up-to-date.s-Is--ignore-installedtignore_installeds5Ignore the installed packages (reinstalling instead).s--usert use_user_sites¸Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full details.)s--eggtas_eggsâInstall packages as eggs, not 'flat', like pip normally does. This option is not about installing *from* eggs. (WARNING: Because this option overrides pip's normal install logic, requirements files may not behave as expected.)s--roott root_paths=Install everything relative to this alternate root directory.s--strip-file-prefixtstrip_file_prefixtprefixs5Strip given prefix from script paths in wheel RECORD.s--prefixt prefix_pathsIInstallation prefix where lib, bin and other top-level folders are placeds --compiletcompilesCompile py files to pycs --no-compilet store_falsesDo not compile py files to pyci(tsuperRt__init__tcmd_optst add_optionR t constraintsteditablet requirementst build_dirtNonetsrctignore_requires_pythontno_depstinstall_optionstglobal_optionstTruet use_wheelt no_use_wheelt no_binaryt only_binarytpretno_cleantrequire_hashestmake_option_groupt index_grouptparsertinsert_option_group(tselftargstkwR,t index_opts((s8/usr/lib/python2.7/site-packages/pip/commands/install.pyR+8s¾      c+C@s.tj|ƒtj|ƒd„}tjƒdkrc|ƒ rctjdtjt j dƒƒn|j rt j dtƒn|jr›t j dtƒn|jr·t j dtƒn|jrÓt j dtƒn|jrøt j dtƒt|_n|jrtjj|jƒ|_ntjj|jƒ|_|jp@g}|jr™|jrdtd ƒ‚ntƒr|td ƒ‚n|jd ƒ|jd ƒnd}|j r#t|_t!j"ƒ}tjj|j ƒ|_ tjj#|j ƒrtjj$|j ƒ rtd ƒ‚n|jd|ƒn|j%p/g}|j&|ƒR}|j'||ƒ}|j(pe|j } t)|j*|j+ƒ} |j*r¶t,|j*ƒ r¶tjd|j*ƒd|_*nt-|jd| ƒÂ} t.d| d|jd|jd|j/d|j0d|j d|jd|j1d|j2d|j3d|jd|d|d|j4d|j5d | d!|j6ƒ} |j7| |||||j8| ƒ| j9s“dSzÜy¸|js³t: s³|j* rÃ| j;|ƒn+t<| |d"gd#gƒ} | j=d$tƒ|js | j>||d%|j?d&|jd'|j@ƒtAd(|jd)|d%|j?d&|jd|j5ƒ}tB| jCd*tDjEd+ƒƒ}g}xe|D]]}|j8}y-tF|j8|ƒ}|r»|d,|7}nWntGk rÏnX|j|ƒq€Wd-jH|ƒ}|rMtjId.|ƒqMnAd-jHg| jJD]}|j8^qƒ}|rMtjId/|ƒnWntKk rmt|_(‚nXWd|j(sˆ| jLƒnXWdQXWdQX|j r*tM|j ƒg}tNd0d)|ƒd1}tNd0d)|ƒd2}tjj#|ƒrÿ|j|ƒntjj#|ƒr-||kr-|j|ƒnxê|D]â}xÙtjO|ƒD]È}tjjH|j |ƒ}tjj#|ƒró|j/s™tjd3|ƒqJntjjP|ƒrÁtjd4|ƒqJntjj$|ƒrãtQjR|ƒqótjS|ƒntQjTtjjH||ƒ|ƒqJWq4WtQjR|ƒn| S(5NcS@s.ttdƒp-ttdƒo-tjtjkS(Nt real_prefixt base_prefix(thasattrtsysRIR&(((s8/usr/lib/python2.7/site-packages/pip/commands/install.pytis_venvÎsispWARNING: Running pip install with root privileges is generally not a good idea. Try `%s install --user` instead.sÉ--egg has been deprecated and will be removed in the future. This flag is mutually exclusive with large parts of pip, and actually using it invalidates pip's ability to manage the installation process.s--allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.s“--allow-all-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.s‘--allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.s‰pip install --download has been deprecated and will be removed in the future. Pip now has a download command that should be used instead.sVCan not combine '--user' and '--prefix' as they imply different installation locationssZCan not perform a '--user' install. User site-packages are not visible in this virtualenv.s--users --prefix=s=Target path exists but is not a directory, will not continue.s--home=sÝ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.tdeleteR1tsrc_dirRRRR#R!tignore_dependenciesR4R R"Rtsessiont pycompiletisolatedt wheel_cacheR?t build_optionsR7t autobuildingtrootR&R%tuserthometkeytnamet-t sSuccessfully installed %ssSuccessfully downloaded %sttpurelibtplatlibsKTarget directory %s already exists. Specify --upgrade to force replacement.s„Target directory %s already exists and is a link. Pip will not automatically replace links, please remove if replacement is desired.(UR tresolve_wheel_no_use_binarytcheck_install_build_globaltostgetuidtloggertwarningRtbasenameRKtargvR#twarningstwarnR tallow_externaltallow_all_externaltallow_unverifiedRR8R!R1tabspathRNR6R"R'RRRtappendR2RttempfiletmkdtemptexiststisdirR7t_build_sessiont_build_package_finderR>Rt cache_dirtformat_controlRR RRRROR4R R(t isolated_modeR?tpopulate_requirement_setRZthas_requirementstwheelt prepare_filesRtbuildRR$R%tget_lib_location_guessestsortedtsuccessfully_installedtoperatort attrgetterR t Exceptiontjointinfotsuccessfully_downloadedRt cleanup_filesR Rtlistdirtislinktshutiltrmtreetremovetmove(RDtoptionsRERLR6ttemp_target_dirR7RPtfindert build_deleteRSR1trequirement_settwbtpossible_lib_locationstreqstitemstreqtitemtinstalled_versiont installedt downloadedt lib_dir_listt purelib_dirt platlib_dirtlib_dirttarget_item_dir((s8/usr/lib/python2.7/site-packages/pip/commands/install.pytrunÊsR                                                                (t__name__t __module__t__doc__RZtusagetsummaryR+R (((s8/usr/lib/python2.7/site-packages/pip/commands/install.pyR!s   ’cO@s$td||Ž}|d|dgS(NR]R^R_(R(REtkwargstscheme((s8/usr/lib/python2.7/site-packages/pip/commands/install.pyR}Ês(+t __future__RtloggingR€RbRoR‰RhRKRRzt ImportErrorR2tpip.reqRtpip.basecommandRt pip.locationsRRtpip.exceptionsRRRtpipR t pip.utilsR R tpip.utils.buildR tpip.utils.deprecationR tpip.utils.filesystemRt pip.wheelRRt getLoggerR¡RdRR}(((s8/usr/lib/python2.7/site-packages/pip/commands/install.pyts4         ÿª