Your IP : 18.116.47.194


Current Path : /opt/alt/python27/lib/python2.7/site-packages/pip/_internal/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pyc

�
�Rec@s�dZddlZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZm
Z
mZddlmZddlmZdd	lmZdd
lmZmZddlmZer/ddlmZdd
lmZmZm Z m!Z!m"Z"m#Z#ddl$m%Z%nej&e'�Z(ddd��YZ)de*fd��YZ+de+fd��YZ,dS(s;Build Environment used for isolation during sdist building
i����N(tOrderedDict(tget_python_lib(t	get_paths(tRequirementtVersionConflictt
WorkingSet(t__file__(topen_spinner(tcall_subprocess(t
TempDirectoryt
tempdir_kinds(tMYPY_CHECK_RUNNING(t
TracebackType(tTupletSettIterabletOptionaltListtType(t
PackageFindert_PrefixcBseZd�ZRS(cCs�||_t|_ttjdkr*dnddi|d6|d6�d|_tdtd|�}tdtd|�}||kr�|g|_	n||g|_	dS(	Ntnttposix_prefixtvarstbasetplatbasetscriptst
plat_specifictprefix(
tpathtFalsetsetupRtostnametbin_dirRtTruetlib_dirs(tselfRtpurelibtplatlib((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pyt__init__s		
(t__name__t
__module__R((((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pyRstBuildEnvironmentcBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(sFCreates and manages an isolated environment to install build deps
    c
sYtdtjdt��t�fd�dD��|_g|_g|_xItt	|jj
���D],}|jj|j�|jj
|j�qeWd�tdt�tdt�fD�}tjj�jd�|_tjj|j�stj|j�nttjj|jd	�d
��2}|jtjd�jd|d
|j��WdQXdS(Ntkindtglobally_managedc3s3|])}|ttjj�j|��fVqdS(N(RR Rtjoin(t.0R!(ttemp_dir(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pys	<genexpr>;stnormaltoverlaycSs"h|]}tjj|��qS((R Rtnormcase(R/tsite((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pys	<setcomp>Is	RR4ssitecustomize.pytws�
                import os, site, sys

                # First, drop system-sites related paths.
                original_sys_path = sys.path[:]
                known_paths = set()
                for path in {system_sites!r}:
                    site.addsitedir(path, known_paths=known_paths)
                system_paths = set(
                    os.path.normcase(path)
                    for path in sys.path[len(original_sys_path):]
                )
                original_sys_path = [
                    path for path in original_sys_path
                    if os.path.normcase(path) not in system_paths
                ]
                sys.path = original_sys_path

                # Second, add lib directories.
                # ensuring .pth file are processed.
                for path in {lib_dirs!r}:
                    assert not path in sys.path
                    site.addsitedir(path)
                tsystem_sitesR$(R1R2(R	R
t	BUILD_ENVR#Rt	_prefixest	_bin_dirst	_lib_dirstreversedtlisttvaluestappendR"textendR$RRR RR.t	_site_dirtexiststmkdirtopentwritettextwraptdedenttformat(R%RR6tfp((R0s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pyR(4s(		"$cCs�d�dD�|_|j}|jd}|rL|j|jtj��n|jg}tjjitjj	|�d6dd6tjj	|�d6�dS(NcSs(i|]}tjj|d�|�qS(N(R tenvirontgettNone(R/R!((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pys
<dictcomp>ps	tPATHtPYTHONNOUSERSITEt
PYTHONPATHt1(RLRMRN(
t	_save_envR9R?tsplitR tpathsepR@RItupdateR.(R%Rtold_patht
pythonpath((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pyt	__enter__ms


cCsSxL|jj�D];\}}|dkr>tjj|d�q|tj|<qWdS(N(RPtitemsRKR RItpop(R%texc_typetexc_valtexc_tbtvarnamet	old_value((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pyt__exit__�scCs�t�}t�}|r�t|j�}x�|D]�}y2|jtj|��dkre|j|�nWq.tk
r�}|jt	|j
dj��t	|j
d�f�q.Xq.Wn||fS(s�Return 2 sets:
            - conflicting requirements: set of (installed, wanted) reqs tuples
            - missing requirements: set of reqs
        iiN(tsetRR:tfindRtparseRKtaddRtstrtargstas_requirement(R%treqstmissingtconflictingtwstreqte((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pytcheck_requirements�s		
"cCs|j|}|jst�t|_|s0dStjtjjt	�dddd|jdg}t
j�tj
kr�|jd�nx[dD]S}t|j|�}|jd	|jd
d�djt|p�d
h��f�q�W|j}	|	r4|jd|	dg�x5|	dD]}
|jd|
g�qWn
|jd�x$|jD]}|jd|g�qKWx$|jD]}|jd|g�qrW|jr�|jd�n|jr�|jd�n|jd	�|j|�t|��}
t|d|
�WdQXdS(Ntinstalls--ignore-installeds	--no-users--prefixs--no-warn-script-locations-vt	no_binarytonly_binarys--t_t-t,s:none:s-iiis--extra-index-urls
--no-indexs--find-linkss--trusted-hosts--pres--prefer-binarytspinner(RnRo(R8RtAssertionErrorR#tsyst
executableR Rtdirnametpip_locationtloggertgetEffectiveLeveltloggingtDEBUGR>tgetattrtformat_controlR?treplaceR.tsortedt
index_urlst
find_linkst
trusted_hoststallow_all_prereleasest
prefer_binaryRR(R%tfindertrequirementstprefix_as_stringtmessageRRdR~tformatsR�textra_indextlinkthostRs((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pytinstall_requirements�s@
		
&	
		

(R)R*t__doc__R(RVR^RlR�(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pyR+0s	9		
	tNoOpBuildEnvironmentcBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(s5A no-op drop-in replacement for BuildEnvironment
    cCsdS(N((R%((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pyR(�scCsdS(N((R%((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pyRV�scCsdS(N((R%RYRZR[((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pyR^�scCsdS(N((R%((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pytcleanup�scCs
t��dS(N(tNotImplementedError(R%R�R�R�R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pyR��s(R)R*R�R(RVR^R�R�(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pyR��s					((-R�R{R RuREtcollectionsRtdistutils.sysconfigRt	sysconfigRtpip._vendor.pkg_resourcesRRRtpipRRxtpip._internal.cli.spinnersRtpip._internal.utils.subprocessRtpip._internal.utils.temp_dirR	R
tpip._internal.utils.typingRttypesRttypingR
RRRRRt"pip._internal.index.package_finderRt	getLoggerR)RyRtobjectR+R�(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/build_env.pyt<module>s*.�

?>