????

Your IP : 216.73.216.152


Current Path : /usr/lib/python2.7/site-packages/pip/_internal/commands/
Upload File :
Current File : //usr/lib/python2.7/site-packages/pip/_internal/commands/install.pyc

�
}�\]c@@s�ddlmZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZddlmZddlmZdd	lmZdd
lmZmZmZddlmZddlmZdd
lmZddlm Z ddl!m"Z"m#Z#ddl$m%Z%ddl&m'Z'ddl(m)Z)m*Z*m+Z+ddl,m-Z-ddl.m/Z/ddl0m1Z1ej2e3�Z4d�Z5d�Z6defd��YZ7d�Z8d�Z9dS(i(tabsolute_importN(t
SUPPRESS_HELP(t
pkg_resources(t
WheelCache(t
cmdoptions(tRequirementCommand(tmake_target_python(tERROR(tCommandErrortInstallationErrortPreviousBuildDirError(tResolver(tdistutils_scheme(tcheck_install_conflicts(tRequirementPreparer(tRequirementSettinstall_given_reqs(tRequirementTracker(tcheck_path_owner(t
ensure_dirtget_installed_versiont(protect_pip_from_modification_on_windows(t
TempDirectory(tvirtualenv_no_global(tWheelBuildercC@s)yddl}Wntk
r$tSXtS(s8
    Return whether the wheel package is installed.
    iN(twheeltImportErrortFalsetTrue(R((s=/tmp/pip-install-ewDPok/pip/pip/_internal/commands/install.pytis_wheel_installed&s

cC@sJt�}|j|d|dt�}|rF|j|d|dt�n|S(sQ
    Build wheels for requirements, depending on whether wheel is installed.
    tsessiontautobuilding(RtbuildR(tbuildertpep517_requirementstlegacy_requirementsRtshould_build_legacytbuild_failures((s=/tmp/pip-install-ewDPok/pip/pip/_internal/commands/install.pytbuild_wheels2s	tInstallCommandcB@sDeZdZdZdZdZd�Zd�Zd�Zd�Z	RS(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] <requirement specifier> [package-index-options] ...
      %prog [options] -r <requirements file> [package-index-options] ...
      %prog [options] [-e] <vcs project url> ...
      %prog [options] [-e] <local project path> ...
      %prog [options] <archive url/path> ...sInstall packages.cO@s�tt|�j||�|j}|jtj��|jtj��|jtj��|jtj	��|jtj
��|jdddddddddd	�tj|�|jd
dddd
dd�|jddddddt
�|jddddddddd�|jddddddddd�|jtj��|jtj��|jdddddd
dd�|jddddddddgdd �|jd!dd"dd
dd#�|jd$d%dd&dd
dd'�|jtj��|jtj��|jtj��|jtj��|jtj��|jtj��|jd(dd
dd)dtdd*�|jd+dddd)dd,�|jd-dddd.dtdd/�|jd0dddd1dtdd2�|jtj��|jtj��|jtj��|jtj��|jtj��|jtj��tjtj|j�}|jj d3|�|jj d3|�dS(4Ns-ts--targettdestt
target_dirtmetavartdirtdefaultthelps�Install packages into <dir>. By default this will not replace existing files/folders in <dir>. Use --upgrade to replace existing packages in <dir> with new versions.s--usert
use_user_sitetactiont
store_trues�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	--no-usertstore_falses--roott	root_paths=Install everything relative to this alternate root directory.s--prefixtprefix_pathsIInstallation prefix where lib, bin and other top-level folders are placeds-Us	--upgradetupgrades�Upgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.s--upgrade-strategytupgrade_strategysonly-if-neededtchoicesteagersGDetermines how dependency upgrading should be handled [default: %default]. "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_reinstalls;Reinstall all packages even if they are already up-to-date.s-Is--ignore-installedtignore_installeds5Ignore the installed packages (reinstalling instead).s	--compiletcompiles'Compile Python source files to bytecodes--no-compiles.Do not compile Python source files to bytecodes--no-warn-script-locationtwarn_script_locations0Do not warn when installing scripts outside PATHs--no-warn-conflictstwarn_about_conflictss%Do not warn about broken dependenciesi(!tsuperR't__init__tcmd_optst
add_optionRtrequirementstconstraintstno_depstpreteditabletNonetadd_target_python_optionsRt	build_dirtsrctignore_requires_pythontno_build_isolationt
use_pep517t
no_use_pep517tinstall_optionstglobal_optionsRt	no_binarytonly_binaryt
prefer_binarytno_cleantrequire_hashestprogress_bartmake_option_grouptindex_grouptparsertinsert_option_group(tselftargstkwR@t
index_opts((s=/tmp/pip-install-ewDPok/pip/pip/_internal/commands/install.pyR?bs�		
			c#*C@srtj|�d}|jr(|j}n|jrLtjj|j�|_ntj|dt	�tjj|j
�|_
|jp�g}|jr�|j
r�td��nt�r�td��n|jd�|jd�ntdd�}|jrpt	|_tjj|j�|_tjj|j�rOtjj|j�rOtd	��n|j�|jd
|j�n|jp|g}|j|���}t|�}|jd|d|d
|d|j�}	|jp�|j}
t|j|j �}|jr$t!|j�r$t"j#d|j�d|_nt%��}t|jd|
dd���}
t&d|j'd|j�}z�y;|j(||||	||j)|�t*d|
jd|j
ddddd|j+d|j,d|�}t-d|d|	d|d|d|jd|d |j.d!|j/d|jd"|jd#|j0d$|j1�}|j2|�t3d%|j4d&��g}g}x=|j5j6�D],}|j1r�|j|�qv|j|�qvWt7|	||d'gd(g�}t8d)|d*|d+|d|�}|rtd,j9d-j:d.�|D�����n|j;|�}|j/o5|j<}|rN|j=|�n|j>}|jrit?}nt@|||d/|jAd0|jd1|j
d2|jBd3|d|j�}tCd4|jd0|jd/|jAd1|j
d#|j0�}tDjE|�}tF|d5tGjHd6��}g}xh|D]`}|j)}y0tI|j)d7|�}|rY|d8|7}nWntJk
rmnX|j|�qWd9j:|�}|r�t"jKd:|�nWngtLk
r�} |jMd;k}!tN| |!|j�}"t"jO|"d<|!�tPStQk
rt	|_�nXWd|js6|jR�|jS�nXWdQXWdQXWdQX|jrn|jT|j||j�n|S(=Nsto-satisfy-onlytcheck_targetsVCan 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=tkindttargets=Target path exists but is not a directory, will not continue.s--home=toptionsRt
target_pythonRKs�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.tdeleteR(RUtcheck_supported_wheelsRItsrc_dirtdownload_dirtwheel_download_dirRVtbuild_isolationtreq_trackertpreparertfindertwheel_cacheR/R6R9tignore_dependenciesR:tisolatedRMt
modifying_piptpipt
build_optionsRPR!R"R#sPCould not build wheels for {} which use PEP 517 and cannot be installed directlys, cs@s|]}|jVqdS(N(tname(t.0tr((s=/tmp/pip-install-ewDPok/pip/pip/_internal/commands/install.pys	<genexpr>zstrootthometprefixt	pycompileR<tusertkeyRstworking_sett-t sSuccessfully installed %sitexc_info(URtcheck_install_build_globalR5R6RItostpathtabspathtcheck_dist_restrictionRRfROR/R4RRR	tappendRR*R:texiststisdirtcreateRPt_build_sessionRt_build_package_finderRKRTRt	cache_dirtformat_controlRtloggertwarningRGRRRUtpopulate_requirement_setRsRRVRiRR9Rnt
isolated_modeRMtresolveRthas_requirementRBtvaluesRR&tformattjointget_installation_orderR=t_warn_about_conflictsR<RRR3R;tget_lib_location_guessesRt
WorkingSettsortedtoperatort
attrgetterRt	ExceptiontinfotEnvironmentErrort	verbositytcreate_env_error_messageterrorRR
t
cleanup_filestcleanupt_handle_target_dir(#R[RbR\R6ROttarget_temp_dirRPRRcRltbuild_deleteRmRjt	directorytrequirement_setRktresolverR#R"treqt
wheel_builderR%t
to_installtshould_warn_about_conflictsR<t	installedt
lib_locationsR|treqstitemstitemtinstalled_versionR�tshow_tracebacktmessage((s=/tmp/pip-install-ewDPok/pip/pip/_internal/commands/install.pytrun�s4
					
		
	
	

											
		"	
												
	

		
 	c@s�t|�g}|��tdd|j�}|d}|d}|d}tjj|�rl|j|�ntjj|�r�||kr�|j|�ntjj|�r�|j|�nx.|D]&}	xtj|	�D]}
|	|kr)tjj||
��t�fd�|d D��r)q�q)ntjj||
�}tjj|�r�|slt	j
d|�q�ntjj|�r�t	j
d	|�q�ntjj|�r�t
j|�q�tj|�nt
jtjj|	|
�|�q�Wq�WWdQXdS(
NtRwtpurelibtplatlibtdatac3@s|]}|j��VqdS(N(t
startswith(Rtts(tddir(s=/tmp/pip-install-ewDPok/pip/pip/_internal/commands/install.pys	<genexpr>�si����sKTarget 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.(RRR�R�R�R�tlistdirR�tanyR�R�tislinkR�tshutiltrmtreetremovetmove(R[R*R�R5tlib_dir_listtschemetpurelib_dirtplatlib_dirtdata_dirtlib_dirR�ttarget_item_dir((R�s=/tmp/pip-install-ewDPok/pip/pip/_internal/commands/install.pyR��sJ




 	c	C@s�yt|�\}}Wn%tk
r=tjddt�dSX|\}}xK|D]C}||d}x,||D] }tjd|||d�qpWqQWxV|D]N}||d}x7||D]+\}	}
}tjd||||	|
�q�Wq�WdS(NsError checking for conflicts.Ris*%s %s requires %s, which is not installed.isF%s %s has requirement %s, but you'll have %s %s which is incompatible.(R
R�R�R�Rtcritical(R[R�tpackage_sett	_dep_infotmissingtconflictingtproject_nametversiont
dependencytdep_nametdep_versionR�((s=/tmp/pip-install-ewDPok/pip/pip/_internal/commands/install.pyR�s$


(
t__name__t
__module__t__doc__RstusagetsummaryR?R�R�R�(((s=/tmp/pip-install-ewDPok/pip/pip/_internal/commands/install.pyR'Ks	�	�	8cO@s$td||�}|d|dgS(NR�R�R�(R(R\tkwargsR�((s=/tmp/pip-install-ewDPok/pip/pip/_internal/commands/install.pyR�scC@s�g}|jd�|s<|jd�|jt|��n
|jd�|dcd7<|jtjkr�d}d}|s�|j|d|j�g�n
|j|�|jd	�nd
j|�j�dS(s{Format an error message for an EnvironmentError

    It may occur anytime during the execution of the install command.
    s5Could not install packages due to an EnvironmentErrors: t.i����s
s"Consider using the `--user` optionsCheck the permissionss or s.
R�(R�tstrterrnotEACCEStextendtlowerR�tstrip(R�R�tusing_user_sitetpartstuser_option_parttpermissions_part((s=/tmp/pip-install-ewDPok/pip/pip/_internal/commands/install.pyR�#s"



(:t
__future__RR�tloggingR�R�R�toptparseRtpip._vendorRtpip._internal.cacheRtpip._internal.cliRtpip._internal.cli.base_commandRtpip._internal.cli.cmdoptionsRtpip._internal.cli.status_codesRtpip._internal.exceptionsRR	R
tpip._internal.legacy_resolveRtpip._internal.locationsRtpip._internal.operations.checkR
t pip._internal.operations.prepareRtpip._internal.reqRRtpip._internal.req.req_trackerRtpip._internal.utils.filesystemRtpip._internal.utils.miscRRRtpip._internal.utils.temp_dirRtpip._internal.utils.virtualenvRtpip._internal.wheelRt	getLoggerR�R�RR&R'R�R�(((s=/tmp/pip-install-ewDPok/pip/pip/_internal/commands/install.pyt<module>s>		��