Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyo


t_c@s`dZddlZddlZddlZddlZddlmZmZyddlZWne	k
r{ddl
ZnXdddddd	d
ddd
dgZdZej
rejjeej
ZneejZejdkr(dedjkr(eejjeeZnejdkrndedjkrneejjeeeZnejdkrdedjkreejjeeeZndZeZeadZejZejdZdZdejd Z dejd Z!dejd Z"ejj#ej$Z%ejj#ej&Z'da)dZ*d Z+d!Z,d"Z-d#Z.d$Z/d%Z0dd&Z1d'Z2d(Z3d)Z4dd*Z5d+Z6d,Z7d-Z8e/de9d.Z:e/de9d/Z;d0Z<d1Z=d2Z>d3Z?d4Z@d5ZAeBd6kr\eAndS(7s-Access to Python's configuration information.iN(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((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_safe_realpath"s
tnttpcbuildis\pc\vis\pcbuild\amd64icCs=x6dD].}tjjtjjtd|rtSqWtS(Ns
Setup.distsSetup.localtModules(s
Setup.distsSetup.local(tosRtisfiletjoint
_PROJECT_BASEtTruetFalse(tfn((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pytis_python_build:s
$cCstsddlm}tjddd}||}|jd}|j}tj|WdQXt	rx7d
D],}tj
|d	d
tj
|ddqvWntandS(Ni(tfindert.iis
sysconfig.cfgtposix_prefixt
posix_hometincludes{srcdir}/Includetplatincludes{projectbase}/.(sposix_prefixs
posix_home(t	_cfg_readt	resourcesRt__name__trsplittfindt	as_streamt_SCHEMEStreadfpt
_PYTHON_BUILDtsetR(Rtbackport_packaget_findert_cfgfiletstscheme((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_ensure_cfg_readDs
s\{([^{]*?)\}cs-t|jdr(|jd}n	t}|j}xb|D]Z}|dkr\qDnx?|D]7\}}|j||rqcn|j|||qcWqDW|jdxw|jD]i}t|j|fd}x<|j|D]+\}}|j||t	j
||qWqWdS(Ntglobalscs0|jd}|kr#|S|jdS(Nii(tgroup(tmatchobjtname(t	variables(sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt	_replaceros(R0thas_sectiontitemsttupletsectionst
has_optionR*tremove_sectiontdictt	_VAR_REPLtsub(tconfigR1R:tsectiontoptiontvalueR6((R5sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_expand_globalsYs$	

s%s.%s.%sis%s.%sis%s%scsfd}tj||S(sIn 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|jdS(Nii(R2Rtenviron(R3R4(t
local_vars(sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR6s(R>R?(RRFR6((RFsX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_subst_varsscCsI|j}x6|jD](\}}||kr7qn|||<qWdS(N(tkeysR8(ttarget_dictt
other_dictttarget_keystkeyRC((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_extend_dicts
cCsi}|dkri}nt|tx`tj|D]O\}}tjdkrktjj|}ntjj	t
||||<q;W|S(NtposixR(sposixsnt(tNoneRMRR'R8RR4Rt
expandusertnormpathRG(R/tvarstresRLRC((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_expand_varss	#csfd}tj||S(Ncs0|jd}|kr#|S|jdS(Nii(R2(R3R4(RR(sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR6s(R>R?(RCRRR6((RRsX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pytformat_valuescCstjdkrdStjS(NRNR(RR4(((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_get_default_schemescCstjjdd}d}tjdkr_tjjdpBd}|rO|S||dSntjdkrtd}|r|r|S|dd	|d
tjd Sqn|r|S|ddSdS(
NtPYTHONUSERBASEcWstjjtjj|S(N(RRRPR(targs((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pytjoinusersRtAPPDATAt~tPythontdarwintPYTHONFRAMEWORKtLibrarys%d.%dis.local(	RREtgetROR4tsystplatformRtversion_info(tenv_baseRYtbaset	framework((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_getuserbases"	c	Cstjd}tjd}tjd}|dkrBi}ni}i}tj|dddd}|j}WdQXx|D]}	|	jd	s|	jd
krqn|j|	}
|
r|
j	dd\}}|j}|j
d
d
}
d|
kr|||<q]yt|}Wn'tk
rO|j
d
d||<q]X|||<qqWt
|j}d}x/t|dkrxt|D]}||}|j|p|j|}
|
dk	r|
j	d}t}||kr	t||}n||krt}n|tjkr=tj|}nr||kr|jdrq|d|krqd
}qd||krt}qt|d|}nd
||<}|r||
j}||
j ||}d|kr|||<qyt|}Wn!tk
r)|j||<nX|||<|j||jdr|d|kr|d}||kr|||<qqqq|||<|j|qWq|Wx<|jD].\}}t|tr|j||<qqW|j||S(sParse 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(sCFLAGSsLDFLAGSsCPPFLAGS(tretcompileROtcodecstopent	readlinest
startswithtstriptmatchR2treplacetintt
ValueErrortlistRHtlenR9tsearchRtstrRRREtendtstarttremoveR8t
isinstancetupdate(tfilenameRRt_variable_rxt_findvar1_rxt_findvar2_rxtdonetnotdonetftlinestlinetmtntvttmpvR5trenamed_variablesR4RCtfoundtitemtaftertk((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_parse_makefiles		
!


			






cCs`trtjjtdSttdr>dttjf}nd}tjjt	d|dS(s Return the path of the Makefile.tMakefiletabiflagssconfig-%s%sR@tstdlib(
R)RRRRthasattrRat_PY_VERSION_SHORTRR(tconfig_dir_name((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyRKscCst}yt||WnLtk
rh}d|}t|drY|d|j}nt|nXt}y&t|}t||WdQXWnLtk
r}d|}t|dr|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(	RRtIOErrorRRRRuRR)(RRtmakefiletetmsgtconfig_hR((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_init_posixVs&	
	
cCsqtd|d<td|d<td|d<d|d<d	|d
<t|d<tjjttj|d<d
S(s+Initialize the module as appropriate for NTRtLIBDESTt
platstdlibt
BINLIBDESTRt	INCLUDEPYs.pydtSOs.exetEXEtVERSIONtBINDIRN(Rt_PY_VERSION_SHORT_NO_DOTRRtdirnameRRat
executable(RR((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_init_non_posixrs


cCs|dkri}ntjd}tjd}xtr|j}|sRPn|j|}|r|jdd\}}yt|}Wntk
rnX|||<q6|j|}|r6d||jd<q6q6W|S(sParse 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_rxRRRR((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyRs(		

cCsUtr6tjdkr-tjjtd}qBt}ntd}tjj|dS(sReturn the path of pyconfig.h.RtPCR s
pyconfig.h(R)RR4RRRR(tinc_dir((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyRs	cCstttjS(s,Return a tuple containing the schemes names.(R9tsortedR'R:(((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyRscCs
tjdS(s*Return a tuple containing the paths names.R(R'toptions(((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyRscCs1t|rt||Sttj|SdS(sReturn 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((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyRs
cCst||||S(s[Return a path corresponding to the scheme.

    ``scheme`` is the install scheme name.
    (R(R4R/RRR((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyRscGstd"krRiattd<ttd<ttd<ttd<tdtdtd<ttd<ttd	<ttd
<ytjtd<Wnt	k
rdtd<nXt
jd#krttnt
jdkrt
tntjdkrttd<ndtkr
ttd<nttdtd<trt
jdkrt}yt
j}Wntk
red"}nXt
jjtdr||krt
jj|td}t
jj|td<qntjdkrRt
jd}t|jdd}|dkrTxGd$D]D}t|}tjdd|}tjdd|}|t|<q	WqOdt
jkrt
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|rg}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_nodotRetplatbasetprojectbaseRRlRtos2RNs2.6tuserbasetsrcdirR]RiRot
BASECFLAGSRnt	PY_CFLAGSRs
-arch\s+\w+\st s-isysroot [^ 	]*t	ARCHFLAGSs-isysroot\s+(\S+)is-isysroot\s+\S+(\s|$)N(sntsos2(sLDFLAGSs
BASECFLAGSsCFLAGSs	PY_CFLAGSs	BLDSHARED(sLDFLAGSs
BASECFLAGSsCFLAGSs	PY_CFLAGSs	BLDSHARED(sLDFLAGSs
BASECFLAGSsCFLAGSs	PY_CFLAGSs	BLDSHARED($t_CONFIG_VARSROt_PREFIXt_EXEC_PREFIXt_PY_VERSIONRRRaRtAttributeErrorRR4RRtversionRgRR)tgetcwdR
RtisabsRRQRbtunameR{tsplitRrR?RER`RR2texiststappend(RXRetcwdRtkernel_versiont
major_versionRLtflagstarchRnRtsdktvalsR4((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyRs




















cCstj|S(sReturn the value of a single variable using the dictionary returned by
    'get_config_vars()'.

    Equivalent to get_config_vars().get(name)
    (RR`(R4((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyRPscCs`tjdkrd}tjj|}|dkr:tjStjjd|}tj|t||!j}|dkrdS|dkrdStjStjd	ksttd
rtjStj	\}}}}}|jj
dd}|j
d
d}|j
dd}|d dkr1d||fS|d dkr|ddkrOd}dt|dd|df}qOn|d dkrd||fS|d dkrd|||fS|d dkr
d}tj
d }	|	j|}
|
rO|
j}qOnE|d d!krOt}|jd"}tr|}
ytd#}Wntk
raqXztjd$|j}
Wd%|jX|
d%k	rd&j|
jd'jd&d }
qn|s|
}n|rO|}d(}|
d&d)krd*tjd+djkrd,}tjd+}tjd-|}ttt|}t|d'krv|d}qI|d;krd,}qI|d<krd1}qI|d=krd2}qI|d>krd4}qI|d?krd5}qIt d6|fqL|d.krtj!d@krId0}qIqL|dAkrLtj!dBkr@d3}qId/}qLqOnd:|||fS(CsReturn 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 (it)tamd64s	win-amd64titaniumswin-ia64RNRt/RlRt_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(RR(RR(RRR(RR(RRRRI(RRI("RR4RaRR%RbR~tlowerRRRzR{RrRsRyR2RR`RRuRRtreadtcloseRORRRxtfindallR9RR*R|tmaxsize(RtitjtlooktosnamethosttreleaseRtmachinetrel_reRtcfgvarstmacvert
macreleaseRtcflagstarchs((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR	Ys (	
	+	!
						cCstS(N(R(((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR
scCsZxStt|jD]9\}\}}|dkrCd|GHnd||fGHqWdS(Nis%s: s
	%s = "%s"(t	enumerateRR8(ttitletdatatindexRLRC((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_print_dicts+cCsRdtGHdtGHdtGHdGHtdtdGHtdtdS(	s*Display all information sysconfig detains.sPlatform: "%s"sPython version: "%s"s!Current installation scheme: "%s"tPathst	VariablesN(((R	R
RVRRR(((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_mainst__main__(Ct__doc__RtRRrRatos.pathRRtconfigparsertImportErrortConfigParsert__all__RRRRRRR4RRRR)RR!R0tRawConfigParserR'RsR>RDRcRRRRQRRRRRORt
_USER_BASERGRMRTRURVRgRRRRRRRRRRRRRR	R
RRR#(((sX/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt<module>s
			%%!%!				!			
				v						
							
Back to Directory File Manager