AlkantarClanX12

Your IP : 18.118.19.123


Current Path : /proc/self/root/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/
Upload File :
Current File : //proc/self/root/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyo

�
��abc@s_dZddlZddlZddlZddlZddlmZmZyddlZWne	k
r{ddl
ZnXdddddd	d
ddd
dgZd�Zej
r�ejjeej
��Zneej��Zejdkr(dedj�kr(eejjee��Znejdkrndedj�krneejjeee��Znejdkr�dedj�kr�eejjeee��Znd�Ze�Zead�Zej�Zejd�Zd�Zejj �dZ!ejd Z"e!de!dZ#ejj$ej%�Z&ejj$ej'�Z(da*dZ+d�Z,d�Z-d �Z.d!�Z/d"�Z0d#�Z1dd$�Z2d%�Z3d&�Z4d'�Z5dd(�Z6d)�Z7d*�Z8d+�Z9e0�de:d,�Z;e0�de:d-�Z<d.�Z=d/�Z>d0�Z?d1�Z@d2�ZAd3�ZBeCd4kr[eB�ndS(5s-Access to Python's configuration information.i����N(tpardirtrealpathtget_config_h_filenametget_config_vartget_config_varstget_makefile_filenametget_pathtget_path_namest	get_pathstget_platformtget_python_versiontget_scheme_namestparse_config_hcCs'yt|�SWntk
r"|SXdS(N(RtOSError(tpath((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_safe_realpath"s
tnttpcbuildi����s\pc\vi����s\pcbuild\amd64i�cCs=x6dD].}tjjtjjtd|��rtSqWtS(Ns
Setup.distsSetup.localtModules(s
Setup.distsSetup.local(tosRtisfiletjoint
_PROJECT_BASEtTruetFalse(tfn((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pytis_python_build:s
$cCs�ts�ddlm}tjdd�d}||�}|jd�}|j��}tj|�WdQXt	r�x7d
D],}tj
|d	d
�tj
|dd�qvWntandS(Ni(tfindert.iis
sysconfig.cfgtposix_prefixt
posix_hometincludes{srcdir}/Includetplatincludes{projectbase}/.(RR(t	_cfg_readt	resourcesRt__name__trsplittfindt	as_streamt_SCHEMEStreadfpt
_PYTHON_BUILDtsetR(Rtbackport_packaget_findert_cfgfiletstscheme((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_ensure_cfg_readDs
s\{([^{]*?)\}cs-t�|jd�r(|jd�}n	t�}|j�}xb|D]Z}|dkr\qDnx?|D]7\}}|j||�r�qcn|j|||�qcWqDW|jd�xw|j�D]i}t|j|����fd�}x<|j|�D]+\}}|j||t	j
||��q�Wq�WdS(Ntglobalscs0|jd�}|�kr#�|S|jd�S(Nii(tgroup(tmatchobjtname(t	variables(sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt	_replaceros(R0thas_sectiontitemsttupletsectionst
has_optionR*tremove_sectiontdictt	_VAR_REPLtsub(tconfigR1R:tsectiontoptiontvalueR6((R5sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_expand_globalsYs$	

iiics�fd�}tj||�S(s�In the string `path`, replace tokens like {some.thing} with the
    corresponding value from the map `local_vars`.

    If there is no corresponding value, leave the token unchanged.
    csJ|jd�}|�kr#�|S|tjkr=tj|S|jd�S(Nii(R2Rtenviron(R3R4(t
local_vars(sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR6�s(R>R?(RRFR6((RFsK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_subst_vars�scCsI|j�}x6|j�D](\}}||kr7qn|||<qWdS(N(tkeysR8(ttarget_dictt
other_dictttarget_keystkeyRC((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_extend_dict�s
cCs�i}|dkri}nt|t��x`tj|�D]O\}}tjdkrktjj|�}ntjj	t
||��||<q;W|S(NtposixR(RNR(tNoneRMRR'R8RR4Rt
expandusertnormpathRG(R/tvarstresRLRC((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_expand_vars�s	#cs�fd�}tj||�S(Ncs0|jd�}|�kr#�|S|jd�S(Nii(R2(R3R4(RR(sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR6�s(R>R?(RCRRR6((RRsK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pytformat_value�scCstjdkrdStjS(NRNR(RR4(((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_get_default_scheme�scCs�tjjdd�}d�}tjdkr_tjjd�pBd}|rO|S||d�Sntjdkr�td�}|r�|r�|S|dd	|d
tjd �Sq�n|r�|S|dd�SdS(
NtPYTHONUSERBASEcWstjjtjj|��S(N(RRRPR(targs((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pytjoinuser�sRtAPPDATAt~tPythontdarwintPYTHONFRAMEWORKtLibrarys%d.%dis.local(	RREtgetROR4tsystplatformRtversion_info(tenv_baseRYtbaset	framework((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_getuserbase�s"	cCs�tjd�}tjd�}tjd�}|dkrBi}ni}i}tj|dddd��}|j�}WdQXx�|D]�}	|	jd	�s�|	j�d
kr�q�n|j|	�}
|
r�|
j	dd�\}}|j�}|j
d
d
�}
d|
kr|||<q]yt|�}Wn'tk
rO|j
d
d�||<q]X|||<q�q�Wt
|j��}d}x/t|�dkr�xt|�D]}||}|j|�p�|j|�}
|
dk	r�|
j	d�}t}||kr	t||�}n�||krt}n�|tjkr=tj|}nr||kr�|jd�rq|d|krqd
}q�d||kr�t}q�t|d|�}nd
||<}|r�||
j�}||
j� ||}d|kr�|||<q�yt|�}Wn!tk
r)|j�||<nX|||<|j|�|jd�r�|d|kr�|d}||kr�|||<q�q�q�q�|||<|j|�q�Wq|Wx<|j�D].\}}t|t�r�|j�||<q�q�W|j|�|S(s�Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    s"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)s\$\(([A-Za-z][A-Za-z0-9_]*)\)s\${([A-Za-z][A-Za-z0-9_]*)}tencodingsutf-8terrorstsurrogateescapeNt#tiis$$t$tCFLAGStLDFLAGStCPPFLAGSitPY_i(RnRoRp(tretcompileROtcodecstopent	readlinest
startswithtstriptmatchR2treplacetintt
ValueErrortlistRHtlenR9tsearchRtstrRRREtendtstarttremoveR8t
isinstancetupdate(tfilenameRRt_variable_rxt_findvar1_rxt_findvar2_rxtdonetnotdonetftlinestlinetmtntvttmpvR5trenamed_variablesR4RCtfoundtitemtaftertk((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_parse_makefile�s�		
!


			






cCs`trtjjtd�Sttd�r>dttjf}nd}tjjt	d�|d�S(s Return the path of the Makefile.tMakefiletabiflagssconfig-%s%sR@tstdlib(
R)RRRRthasattrRat_PY_VERSION_SHORTR�R(tconfig_dir_name((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyRMscCst�}yt||�WnLtk
rh}d|}t|d�rY|d|j}nt|��nXt�}y&t|��}t||�WdQXWnLtk
r�}d|}t|d�r�|d|j}nt|��nXtr�|d|d<ndS(s7Initialize the module as appropriate for POSIX systems.s.invalid Python installation: unable to open %ststrerrors (%s)Nt	BLDSHAREDtLDSHARED(	RR�tIOErrorR�R�RRuRR)(RRtmakefiletetmsgtconfig_hR�((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_init_posixXs&	
	
cCsqtd�|d<td�|d<td�|d<d|d<d	|d
<t|d<tjjttj��|d<d
S(s+Initialize the module as appropriate for NTR�tLIBDESTt
platstdlibt
BINLIBDESTRt	INCLUDEPYs.pydtSOs.exetEXEtVERSIONtBINDIRN(Rt_PY_VERSION_SHORT_NO_DOTRRtdirnameRRat
executable(RR((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_init_non_posixts


cCs�|dkri}ntjd�}tjd�}x�tr�|j�}|sRPn|j|�}|r�|jdd�\}}yt|�}Wntk
r�nX|||<q6|j|�}|r6d||jd�<q6q6W|S(s�Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    s"#define ([A-Z][A-Za-z0-9_]+) (.*)
s&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
iiiN(	RORrRsRtreadlineRyR2R{R|(tfpRRt	define_rxtundef_rxR�R�R�R�((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR�s(		

cCsUtr6tjdkr-tjjtd�}qBt}ntd�}tjj|d�S(sReturn the path of pyconfig.h.RtPCR s
pyconfig.h(R)RR4RRRR(tinc_dir((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR�s	cCstttj���S(s,Return a tuple containing the schemes names.(R9tsortedR'R:(((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR�scCs
tjd�S(s*Return a tuple containing the paths names.R(R'toptions(((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR�scCs1t�|rt||�Sttj|��SdS(s�Return a mapping containing an install scheme.

    ``scheme`` is the install scheme name. If not provided, it will
    return the default scheme for the current platform.
    N(R0RTR=R'R8(R/RRtexpand((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR�s
cCst|||�|S(s[Return a path corresponding to the scheme.

    ``scheme`` is the install scheme name.
    (R(R4R/RRR�((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR�scGs�td"krRiattd<ttd<ttd<ttd<tdtdtd<ttd<ttd	<ttd
<ytjtd<Wnt	k
r�dtd<nXt
jd#kr�tt�nt
jdkr�t
t�ntjdkr�t�td<ndtkr
ttd<nttd�td<tr�t
jdkr�t}yt
j�}Wntk
red"}nXt
jjtd�r�||kr�t
jj|td�}t
jj|�td<q�ntjdkrRt
j�d}t|jd�d�}|dkrTxGd$D]D}t|}tjdd|�}tjdd|�}|t|<q	WqOdt
jkr�t
jd}xHd%D]=}t|}tjdd|�}|d|}|t|<qwWntjdd�}	tj d|	�}
|
d"k	rO|
j!d �}t
jj"|�sLx:d&D]/}t|}tjd!d|�}|t|<qWqLqOqRn|r�g}x$|D]}
|j#tj|
��qeW|StSd"S('syWith no arguments, return a dictionary of all configuration
    variables relevant for the current platform.

    On Unix, this means every variable defined in Python's installed Makefile;
    On Windows and Mac OS it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    tprefixtexec_prefixt
py_versiontpy_version_shortiitpy_version_nodotRetplatbasetprojectbaseR�RlRtos2RNs2.6tuserbasetsrcdirR]RiRot
BASECFLAGSRnt	PY_CFLAGSR�s
-arch\s+\w+\st s-isysroot [^ 	]*t	ARCHFLAGSs-isysroot\s+(\S+)is-isysroot\s+\S+(\s|$)N(RR�(RoR�RnR�R�(RoR�RnR�R�(RoR�RnR�R�($t_CONFIG_VARSROt_PREFIXt_EXEC_PREFIXt_PY_VERSIONR�RRaR�tAttributeErrorRR4R�R�tversionRgRR)tgetcwdR
RtisabsRRQRbtunameR{tsplitRrR?RER`RR2texiststappend(RXRetcwdR�tkernel_versiont
major_versionRLtflagstarchRnR�tsdktvalsR4((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR�s�




















cCst�j|�S(s�Return the value of a single variable using the dictionary returned by
    'get_config_vars()'.

    Equivalent to get_config_vars().get(name)
    (RR`(R4((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyRRscCs`tjdkr�d}tjj|�}|dkr:tjStjjd|�}tj|t|�|!j�}|dkrdS|dkr�dStjStjd	ks�ttd
�r�tjStj	�\}}}}}|j�j
dd�}|j
d
d�}|j
dd�}|d dkr1d||fS|d dkr|ddkrOd}dt|d�d|df}qOn�|d dkr�d||fS|d dkr�d|||fS|d dkr
d}tj
d �}	|	j|�}
|
rO|
j�}qOnE|d d!krOt�}|jd"�}tr�|}
ytd#�}Wntk
raq�Xztjd$|j��}
Wd%|j�X|
d%k	r�d&j|
jd'�jd&�d �}
q�n|s�|
}n|rO|}d(}|
d&d)kr�d*t�jd+d�j�kr�d,}t�jd+�}tjd-|�}ttt|���}t|�d'krv|d}qI|d;kr�d,}qI|d<kr�d1}qI|d=kr�d2}qI|d>kr�d4}qI|d?kr�d5}qIt d6|f��qL|d.krtj!d@krId0}qIqL|dAkrLtj!dBkr@d3}qId/}qLqOnd:|||fS(Cs�Return a string that identifies the current platform.

    This is used mainly to distinguish platform-specific build directories and
    platform-specific built distributions.  Typically includes the OS name
    and version and the architecture (as supplied by 'os.uname()'),
    although the exact information included depends on the OS; eg. for IRIX
    the architecture isn't particularly important (IRIX only runs on SGI
    hardware), but for Linux the kernel version isn't particularly
    important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u
       irix-5.3
       irix64-6.2

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win-ia64 (64bit Windows on Itanium)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.
    Rs bit (i����t)tamd64s	win-amd64titaniumswin-ia64RNR�t/RlR�t_t-itlinuxs%s-%stsunosit5tsolariss%d.%siiitirixtaixs%s-%s.%sitcygwins[\d.]+R]tMACOSX_DEPLOYMENT_TARGETs0/System/Library/CoreServices/SystemVersion.plists=<key>ProductUserVisibleVersion</key>\s*<string>(.*?)</string>NRitmacosxs10.4.s-archRntfats
-arch\s+(\S+)ti386tppctx86_64tinteltfat3tppc64tfat64t	universals%Don't know machine value for archs=%ri tPowerPCtPower_Macintoshs%s-%s-%s(R�R�(R�R�(R�R�R�(R�R�(R�R�R�R�I(R�R�I("RR4RaR�R%RbR~tlowerR�R�RzR{RrRsRyR2RR`RRuR�RtreadtcloseRORR�RxtfindallR9R�R*R|tmaxsize(R�titjtlooktosnamethosttreleaseR�tmachinetrel_reR�tcfgvarstmacvert
macreleaseR�tcflagstarchs((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR	[s� (	
	+	!
						cCstS(N(R�(((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR
�scCsZxStt|j���D]9\}\}}|dkrCd|GHnd||fGHqWdS(Nis%s: s
	%s = "%s"(t	enumerateR�R8(ttitletdatatindexRLRC((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_print_dicts+cCsRdt�GHdt�GHdt�GHdGHtdt��dGHtdt��dS(	s*Display all information sysconfig detains.sPlatform: "%s"sPython version: "%s"s!Current installation scheme: "%s"tPathst	VariablesN(((R	R
RVRRR(((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_mainst__main__(Dt__doc__RtRRrRatos.pathRRtconfigparsertImportErrortConfigParsert__all__RR�RR�RR�R4R�RRR)RR!R0tRawConfigParserR'RsR>RDR�R�R�R�R�RQR�R�R�R�ROR�t
_USER_BASERGRMRTRURVRgR�RR�R�RRRRRRRRRR	R
RRR#(((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt<module>s�
			%%!%!				#
			
				v						
	�			�