Current File : //lib/python2.7/sysconfig.pyc
�
;;Wgc@s"dZddlZddlZddlmZmZi
idd6dd6dd	6d
d6dd
6dd6dd6dd6d6idd6dd6dd	6dd6dd
6dd6dd6dd6d6idd6dd6dd	6dd6dd
6dd6dd6dd6d6idd6dd6dd	6dd6d d
6d d6dd6dd6d!6id"d6d"d6d#d	6d#d6d$d
6d$d6d%d6dd6d&6id"d6d"d6d#d	6d#d6d$d
6d$d6d%d6dd6d'6id(d6d(d6d)d	6d)d6d*d
6d+d6d,d6d-6id.d6d.d6d/d	6d/d6d0d
6d1d6d,d6d26id(d6d(d6d)d	6d)d6d*d
6d+d6d,d6d36id4d6d4d6d5d	6d5d6d6d
6d+d6d,d6d76Zd`Zejj	�d8Z
ejd9 Ze
d8e
d:Zej
jej�Zej
jej�ZdadZd;�Zejr2ej
jeej��Zneej��Zejd&kr�d<ed=j�kr�eej
jee��Znejd&kr�d>ed?j�kr�eej
jeee��Znejd&kr`ej
jej
jej
je���j�d@kr`ej
jej
je��j�dAkr`eej
jeeee��Znejd&kr�dBedCj�kr�eej
jeee��ZndDejkr�ej
jej
j dE��ZndF�Z!e!�Z"e"rx-daD]"Z#dGee#d
<dHee#d<q�WndI�Z$dJ�Z%dK�Z&dL�Z'dM�Z(ddN�Z)dO�Z*e*Z+dP�Z,dQ�Z-dR�Z.ddS�Z/dT�Z0dU�Z1dV�Z2e'�de3dW�Z4e'�de3dX�Z5dY�Z6dZ�Z7d[�Z8d\�Z9d]�Z:d^�Z;e<d_kre;�ndS(bs7Provide access to Python's configuration information.

i����N(tpardirtrealpaths#{base}/lib/python{py_version_short}tstdlibs'{platbase}/lib/python{py_version_short}t
platstdlibs1{base}/lib/python{py_version_short}/site-packagestpurelibs5{platbase}/lib/python{py_version_short}/site-packagestplatlibs'{base}/include/python{py_version_short}tincludes+{platbase}/include/python{py_version_short}tplatincludes
{base}/bintscriptss{base}tdatatposix_prefixs7{base}/local/lib/python{py_version_short}/dist-packagess;{platbase}/local/lib/python{py_version_short}/dist-packagess-{base}/local/include/python{py_version_short}s1{platbase}/local/include/python{py_version_short}s{base}/local/bins{base}/localtposix_locals1{base}/lib/python{py_version_short}/dist-packagess5{platbase}/lib/python{py_version_short}/dist-packagest
deb_systems{base}/lib/pythons{base}/include/pythont
posix_homes
{base}/Libs{base}/Lib/site-packagess{base}/Includes{base}/Scriptstnttos2s'{userbase}/lib/python{py_version_short}s5{userbase}/lib/python{py_version_short}/site-packagess+{userbase}/include/python{py_version_short}s{userbase}/bins
{userbase}tos2_homes#{userbase}/Python{py_version_nodot}s1{userbase}/Python{py_version_nodot}/site-packagess+{userbase}/Python{py_version_nodot}/Includes{userbase}/Scriptstnt_usert
posix_users{userbase}/lib/pythons#{userbase}/lib/python/site-packagess{userbase}/includetosx_framework_useriiicCs'yt|�SWntk
r"|SXdS(N(RtOSError(tpath((s/usr/lib/python2.7/sysconfig.pyt_safe_realpathus
tpcbuildi����s\pc\vi����tpcsvs9.0s\pcbuild\amd64i�t_PYTHON_PROJECT_BASEt.cCs=x6dD].}tjjtjjtd|��rtSqWtS(Ns
Setup.distsSetup.localtModules(s
Setup.distsSetup.local(tosRtisfiletjoint
_PROJECT_BASEtTruetFalse(tfn((s/usr/lib/python2.7/sysconfig.pytis_python_build�s
$s{projectbase}/Includes{srcdir}cCscy|j|�SWnKtk
r^y|jtj�SWq_tk
rZ}td|��q_XnXdS(Ns{%s}(tformattKeyErrorRtenvirontAttributeError(tst
local_varstvar((s/usr/lib/python2.7/sysconfig.pyt_subst_vars�s
cCsI|j�}x6|j�D](\}}||kr7qn|||<qWdS(N(tkeystitems(ttarget_dictt
other_dictttarget_keystkeytvalue((s/usr/lib/python2.7/sysconfig.pyt_extend_dict�s
cCs�i}|dkri}nt|t��xat|j�D]O\}}tjdkrltjj|�}ntjj	t
||��||<q<W|S(NtposixR(R4R(tNoneR3tget_config_varst_INSTALL_SCHEMESR-RtnameRt
expandusertnormpathR+(tschemetvarstresR1R2((s/usr/lib/python2.7/sysconfig.pyt_expand_vars�s	#cCsftjdkr_tjjtjp'tj�dk}|r[dtjkr[dtjkr[dSdStjS(	NR4s/usrs
/usr/localtPYTHONUSERBASEtreal_prefixRR
(s/usrs
/usr/local(	RR8RR:tsystexec_prefixtprefixR&t__dict__(tis_default_prefix((s/usr/lib/python2.7/sysconfig.pyt_get_default_scheme�s$$cCs�tjjdd�}d�}tjdkr\tjjd�pBd}|rO|S||d�Stjdkr�td�}|r�|r�|S|dd	|d
tjd �Sn|r�|S|dd�S(
NR?cWstjjtjj|��S(N(RRR9R(targs((s/usr/lib/python2.7/sysconfig.pytjoinuser�sRtAPPDATAt~tPythontdarwintPYTHONFRAMEWORKtLibrarys%d.%dis.local(	RR&tgetR5R8RAtplatformtget_config_vartversion_info(tenv_baseRHtbaset	framework((s/usr/lib/python2.7/sysconfig.pyt_getuserbase�s	
cCs�ddl}|jd�}|jd�}|jd�}|dkrNi}ni}i}t|��}|j�}	WdQXx�|	D]�}
|
jd�s�|
j�dkr�q�n|j|
�}|r�|jdd	�\}}
|
j�}
|
j	d
d�}d|kr|
||<qZyt
|
�}
Wn'tk
rL|
j	d
d�||<qZX|
||<q�q�Wt|j
��}d}x/t|�dkr�xt|�D]}||}|j|�p�|j|�}|dk	r�|jd�}t}||krt||�}n�||krt}n�|tjkr:tj|}nr||kr�|jd�rn|d|krnd}q�d||kr�t}q�t|d|�}nd||<}|r�||j�}||j� ||}d|kr�|||<q�yt
|�}Wn!tk
r&|j�||<nX|||<|j|�|jd�r�|d|kr�|d}||kr�|||<q�q�q�q�|||<|j|�q�WqyWx<|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.
    i����Ns"([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_]*)}t#tiis$$t$tCFLAGStLDFLAGStCPPFLAGSitPY_i(RZR[R\(tretcompileR5topent	readlinest
startswithtstriptmatchtgrouptreplacetintt
ValueErrortlistR,tlenttupletsearchR tstrR!RR&tendtstarttremoveR-t
isinstancetupdate(tfilenameR<R^t_variable_rxt_findvar1_rxt_findvar2_rxtdonetnotdonetftlinestlinetmtntvttmpvt	variablestrenamed_variablesR8R2tfoundtitemtaftertk((s/usr/lib/python2.7/sysconfig.pyt_parse_makefile�s�	
!


			






cCs2trtjjtd�Stjjtd�d�S(s Return the path of the Makefile.tMakefiletLIBPL(t
_PYTHON_BUILDRRRRRQ(((s/usr/lib/python2.7/sysconfig.pytget_makefile_filenameQsc	Cs;ddl}i}t�}yt||�WnLtk
rz}d|}t|d�rk|d|j}nt|��nXt�}y&t|��}t||�WdQXWnLtk
r�}d|}t|d�r�|d|j}nt|��nXt	r|d|d<nd}d	t
jkrYddl}|j
|�}	||	_|	t
j|<nd
t�t
jd f}
tt
d�r�|
d
7}
nytj|
�Wntk
r�nXtjj|
|d�}t|d��4}|jd�|jd�|j|d|�WdQXtdd��}|j|
�WdQXdS(s;Generate the Python module containing build-time variables.i����Ns.invalid Python installation: unable to open %ststrerrors (%s)t	BLDSHAREDtLDSHAREDt_sysconfigdataRLsbuild/lib.%s-%sitgettotalrefcounts-pydebugs.pytwbsB# system configuration generated and used by the sysconfig module
sbuild_time_vars = tstreamspybuilddir.txttw(tpprintR�R�tIOErrorthasattrR�tget_config_h_filenameR`tparse_config_hR�RARPtimpt
new_moduletbuild_time_varstmodulestget_platformtversionRtmakedirsRRRtwrite(R�R<tmakefiletetmsgtconfig_hRyR8R�tmodulet
pybuilddirtdestfile((s/usr/lib/python2.7/sysconfig.pyt_generate_posix_varsZsR	
	

	



cCs!ddlm}|j|�dS(s7Initialize the module as appropriate for POSIX systems.i����(R�N(R�R�Rr(R<R�((s/usr/lib/python2.7/sysconfig.pyt_init_posix�scCsqtd�|d<td�|d<td�|d<d|d<d	|d
<t|d<tjjttj��|d<d
S(s+Initialize the module as appropriate for NTRtLIBDESTRt
BINLIBDESTRt	INCLUDEPYs.pydtSOs.exetEXEtVERSIONtBINDIRN(tget_patht_PY_VERSION_SHORT_NO_DOTRRtdirnameRRAt
executable(R<((s/usr/lib/python2.7/sysconfig.pyt_init_non_posix�s


c	Cs�ddl}|dkr!i}n|jd�}|jd�}x�tr�|j�}|s^Pn|j|�}|r�|jdd�\}}yt|�}Wntk
r�nX|||<qB|j|�}|rBd||jd�<qBqBW|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.
    i����Ns"#define ([A-Z][A-Za-z0-9_]+) (.*)
s&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
iii(	R^R5R_R treadlineRdReRgRh(	tfpR<R^t	define_rxtundef_rxR{R|R}R~((s/usr/lib/python2.7/sysconfig.pyR��s*		

cCswtr6tjdkr-tjjtd�}qdt}n.td�jddd�tj	r]dp`d}tjj|d	�S(
sReturns the path of pyconfig.h.RtPCRs
/usr/locals/usrit_dRXs
pyconfig.h(
R�RR8RRRR�RfRAtpydebug(tinc_dir((s/usr/lib/python2.7/sysconfig.pyR��s	.cCs tj�}|j�t|�S(s-Returns a tuple containing the schemes names.(R7R,tsortRk(tschemes((s/usr/lib/python2.7/sysconfig.pytget_scheme_names�s
cCstS(s+Returns a tuple containing the paths names.(t_SCHEME_KEYS(((s/usr/lib/python2.7/sysconfig.pytget_path_names�scCs|rt||�St|SdS(s�Returns 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(R>R7(R;R<texpand((s/usr/lib/python2.7/sysconfig.pyt	get_paths�s
cCst|||�|S(s\Returns a path corresponding to the scheme.

    ``scheme`` is the install scheme name.
    (R�(R8R;R<R�((s/usr/lib/python2.7/sysconfig.pyR��sc	Gsddl}tdkr�iattd<ttd<ttd<ttd<tdtdtd	<ttd
<ttd<ttd<tj	dkr�t
t�ntj	dkr�tt�nt�td<t
d�}|r�d|td<n
dtd<dtkrttd<ntr�tj	dkr�t}ytj�}Wntk
rId}nXtjjtd�r�||kr�tjj|td�}tjj|�td<q�ntjdkr�ddl}|jt�q�n|rg}x$|D]}|jtj|��q�W|StSdS(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.
    i����NRCRBt
py_versiontpy_version_shortiitpy_version_nodotRTtplatbasetprojectbaseRRR4tuserbaset	MULTIARCHt/tmultiarchsubdirRXtsrcdirRL(RR(R^t_CONFIG_VARSR5t_PREFIXt_EXEC_PREFIXt_PY_VERSIONt_PY_VERSION_SHORTRRR8R�R�RVRQR�tgetcwdRRtisabsRR:RARPt_osx_supporttcustomize_config_varstappendRO(	RGR^t	multiarchRTtcwdR�R�tvalsR8((s/usr/lib/python2.7/sysconfig.pyR6�sR















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)
    (R6RO(R8((s/usr/lib/python2.7/sysconfig.pyRQEscCs�ddl}tjdkr�d}tjj|�}|dkrFtjStjjd|�}tj|t|�|!j�}|dkr�dS|dkr�d	StjSd
tj	kr�tj	d
Stjdks�t
td�r�tjStj�\}}}}}	|j�jd
d�}|	jdd�}	|	jd
d�}	|d dkrWd||	fS|d dkr�|ddkr�d}dt
|d�d|df}idd6dd6}
|	d |
tj7}	q�n�|d! d"kr�d||fS|d d#kr
d$|||fS|d% d&krYd&}|jd'�}|j|�}|r�|j�}q�nC|d% d(kr�ddl}
|
jt�|||	�\}}}	nd)|||	fS(*s�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'.
    i����NRs bit (t)tamd64s	win-amd64titaniumswin-ia64t_PYTHON_HOST_PLATFORMR4tunameR�RXt t_t-itlinuxs%s-%stsunosit5tsolariss%d.%siit32biti���t64bitI�������s.%sitirixtaixs%s-%s.%sitcygwins[\d.]+RLs%s-%s-%s(R^RR8RAR�tfindRPRjtlowerR&R�R�RfRgtmaxintR_RdReR�tget_platform_osxR6(R^RCtitjtlooktosnamethosttreleaseR�tmachinetbitnesstrel_reR|R�((s/usr/lib/python2.7/sysconfig.pyR�MsZ "cCstS(N(R�(((s/usr/lib/python2.7/sysconfig.pytget_python_version�scCsZxStt|j���D]9\}\}}|dkrCd|GHnd||fGHqWdS(Nis%s: s
	%s = "%s"(t	enumeratetsortedR-(ttitleR	tindexR1R2((s/usr/lib/python2.7/sysconfig.pyt_print_dict�s+cCsddtjkrt�dSdt�GHdt�GHdt�GHHtdt��Htdt��dS(s*Display all information sysconfig detains.s--generate-posix-varsNsPlatform: "%s"sPython version: "%s"s!Current installation scheme: "%s"tPathst	Variables(	RAtargvR�R�R�RFR�R�R6(((s/usr/lib/python2.7/sysconfig.pyt_main�st__main__(RRRRRRR	(R
RRR
(=t__doc__RARtos.pathRRR7R�R�tsplitR�R�R�RR:RCR�RBR�R5R�t
_USER_BASERR�R�RR�R8R�RtbasenameR&tabspathR#R�R;R+R3R>RFRVR�R�t_get_makefile_filenameR�R�R�R�R�R�R�R R�R�R6RQR�R�R�Rt__name__(((s/usr/lib/python2.7/sysconfig.pyt<module>s$
		%%!6*$%!!		
							w		D						M		\