AlkantarClanX12

Your IP : 18.217.161.27


Current Path : /opt/alt/python34/lib64/python3.4/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/distutils/__pycache__/sysconfig.cpython-34.pyc

�
i fZS�
@s�dZddlZddlZddlZddlmZejjej�Z	ejjej
�Zejjej�Z
ejjej�Zdejkr�ejjejd�Zn!ejjejjej��Zejdkr/ded1d�j�kr/ejjejjeejj��Znejdkr�d	ed2d�j�kr�ejjejjeejjejj��Znejdkr�ded3d�j�kr�ejjejjeejjejj��Znd
d�Zeedd�Zerlejdkrlej�jd4�rlejje�Zejd�rlejje�Zqlndd�Ze�ZdZyes�ej ZnWne!k
r�YnXdd�Z"dddd�Z#ddddd�Z$dd�Z%dd�Z&dd�Z'dd d!�Z(ej)d"�Z*ej)d#�Z+ej)d$�Z,dd%d&�Z-d'd(�Z.da/d)d*�Z0d+d,�Z1d-d.�Z2d/d0�Z3dS)5a�Provide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.

Written by:   Fred L. Drake, Jr.
Email:        <fdrake@acm.org>
�N�)�DistutilsPlatformErrorZ_PYTHON_PROJECT_BASE�nt�pcbuild�z\pc\v�
z\pcbuild\amd64�cCs=x6dD].}tjjtjj|d|��rdSqWdS)N�
Setup.dist�Setup.local�ModulesTF)r	r
)�os�path�isfile�join)�d�fn�r�8/opt/alt/python34/lib64/python3.4/distutils/sysconfig.py�_is_python_source_dir0s
$r�_home�
pcbuild\amd64cCstrtt�Stt�S)N)�	_sys_homer�project_baserrrr�
_python_build;s
r�cCstjdd�S)z�Return a string containing the major and minor Python version,
    leaving off the patchlevel.  Sample return values could be '1.5'
    or '2.2'.
    N�)�sys�versionrrrr�get_python_versionMsrcCs�|dkr!|rtpt}ntjdkr�tr�tp?t}|rL|Strptjjtt	d��}ntjjt	d�d�}tjj
|�Sdt�t}tjj|d|�Stjdkr�tjj|d�St
d	tj��dS)
a�Return the directory containing installed Python header files.

    If 'plat_specific' is false (the default), this is the path to the
    non-platform-specific header files, i.e. Python.h and so on;
    otherwise, this is the path to platform-specific header files
    (namely pyconfig.h).

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    N�posix�	AST_H_DIR�srcdir�Include�python�includerzFI don't know where Python installs its C header files on platform '%s')�BASE_EXEC_PREFIX�BASE_PREFIXr�name�python_buildrrr
r�get_config_var�normpathr�build_flagsr)�
plat_specific�prefix�baseZincdirZ
python_dirrrr�get_python_incUs$r/cCs�|dkr<|r'|rtp!t}q<|r3tp6t}ntjdkr�|sW|r`d}nd}tjj||dt��}|r�|Stjj|d�SnTtjdkr�|r�tjj|d�Stjj|dd�Snt	d	tj��dS)
aSReturn the directory containing the Python library (standard or
    site additions).

    If 'plat_specific' is true, return the directory containing
    platform-specific modules, i.e. any module from a non-pure-Python
    module distribution; otherwise, return the platform-shared library
    directory.  If 'standard_lib' is true, return the directory
    containing standard Python library modules; otherwise, return the
    directory for site-specific modules.

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    Nr�lib64�libr#z
site-packagesrZLibz?I don't know where Python installs its library on platform '%s')
r%r&�EXEC_PREFIX�PREFIXrr'r
rrr)r,�standard_libr-r1Z	libpythonrrr�get_python_lib{s(	r5cCs�|jdkr�tjdkrStd�sSddl}|jt�dtd<qSntddd	d
ddd
dd�	\	}}}}}}}}	}
dtj	krtj	d}tjdkr�dtj	kr�|j
|�r�||t|�d�}n|}ndtj	kr tj	d}ndtj	kr?tj	d}ndtj	kr^tj	d}n
|d}dtj	kr�|dtj	d}nd
tj	kr�|dtj	d
}|dtj	d
}ndtj	kr|dtj	d}|dtj	d}|dtj	d}ndtj	kr;tj	d}	ndtj	krb|	dtj	d}
n|	d|
}
|d|}|jd|d|d|d|d|d|d|d|
�||_
ndS)z�Do any platform-specific customization of a CCompiler instance.

    Mainly needed on Unix, so we can plug in the information that
    varies across Unices and is stored in Python's Makefile.
    Zunix�darwinZCUSTOMIZED_OSX_COMPILERrN�True�CC�CXX�OPT�CFLAGS�CCSHARED�LDSHARED�SHLIB_SUFFIX�AR�ARFLAGSZCPPz -E�LDFLAGS� �CPPFLAGSZpreprocessor�compilerZcompiler_soZcompiler_cxxZ	linker_soZ
linker_exe�archiver)Z
compiler_typer�platformr)�_osx_support�customize_compiler�_config_vars�get_config_varsr�environ�
startswith�lenZset_executablesZshared_lib_extension)rDrGZccZcxxZoptZcflagsZccsharedZldsharedZshlib_suffix�arZar_flagsZnewccZcpprEZcc_cmdrrrrH�s\
0
	
	rHcCsdtrBtjdkr3tjjtp'td�}qQtp<t}ntdd�}tjj|d�S)z2Return full pathname of installed pyconfig.h file.r�PCr,rz
pyconfig-64.h)r(rr'r
rrrr/)�inc_dirrrr�get_config_h_filename�srQcCs_trtjjtptd�Stdddd�}djt�t	�}tjj||d�S)zAReturn full pathname of installed Makefile from the Python build.�Makefiler,rr4rzconfig-{}{})
r(rr
rrrr5�formatrr+)Zlib_dirZconfig_filerrr�get_makefile_filename�s
rTcCs�|dkri}ntjd�}tjd�}x�|j�}|sLPn|j|�}|r�|jdd�\}}yt|�}Wntk
r�YnX|||<q6|j|�}|r6d||jd�<q6q6W|S)z�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.
    Nz"#define ([A-Z][A-Za-z0-9_]+) (.*)
z&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
r�r)�re�compile�readline�match�group�int�
ValueError)�fp�g�	define_rx�undef_rx�line�m�n�vrrr�parse_config_hs(	

rez"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)z\$\(([A-Za-z][A-Za-z0-9_]*)\)z\${([A-Za-z][A-Za-z0-9_]*)}cCs�ddlm}||dddddddd�}|d	krIi}ni}i}x�|j�}|d	krtPntj|�}|rX|jdd
�\}}	|	j�}	|	jdd�}
d
|
kr�|	||<q yt|	�}	Wn(t	k
r|	jdd
�||<Yq X|	||<qXqXWd}xG|rsx:t
|�D],}||}
tj|
�pkt
j|
�}|re|jd�}d}||kr�t||�}n�||kr�d}n�|tjkr�tj|}nx||krF|jd�r|dd	�|krd}qTd||kr/d}qTt|d|�}nd||<}|rl|
|j�d	�}|
d	|j��}
|j�|
kr�|
|7}
n|
|7}
d
|kr�|
||<qbyt|
�}
Wn"t	k
r�|
j�||<YnX|
||<||=|jd�rb|dd	�|krb|dd	�}||kr_|
||<q_qbqlq@||=q@Wq-W|j�x<|j�D].\}}	t|	t�r�|	j�||<q�q�W|j|�|S)z�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.
    r)�TextFileZstrip_commentsrZskip_blanksZ
join_lines�errors�surrogateescapeNrUz$$r�$r;rArCTF�PY_r)zCFLAGSzLDFLAGSzCPPFLAGS)Zdistutils.text_filerfrX�_variable_rxrYrZ�strip�replacer[r\�list�_findvar1_rx�search�_findvar2_rx�strrrKrL�end�start�close�items�
isinstance�update)rr^rfr]�done�notdonerarbrcrd�tmpv�renamed_variablesr'�value�found�item�after�krrr�parse_makefile(s�$	

	
	%		






r�cCsyxrtj|�ptj|�}|rp|j�\}}|d|�|j|jd��||d�}qPqW|S)a�Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
    'string' according to 'vars' (a dictionary mapping variable names to
    values).  Variables not present in 'vars' are silently expanded to the
    empty string.  The variable values in 'vars' should not contain further
    variable expansions; if 'vars' is the output of 'parse_makefile()',
    you're fine.  Returns a variable-expanded version of 's'.
    rrN)rorprq�span�getrZ)�s�varsrbZbegrsrrr�expand_makefile_vars�s7r�cCs2i}yt�}t||�Wn^tk
r�}z>d|}t|d�rb|d|j}nt|��WYdd}~XnXy/t�}t|��}t||�WdQXWn^tk
r}z>d|}t|d�r�|d|j}nt|��WYdd}~XnXt	r(|d|d<n|a
dS)z7Initialize the module as appropriate for POSIX systems.z.invalid Python installation: unable to open %s�strerrorz (%s)N�	BLDSHAREDr=)rTr��OSError�hasattrr�rrQ�openrer(rI)r^�filename�msgZmy_msg�filerrr�_init_posix�s*	
	
r�cCs�i}tdddd�|d<tdddd�|d<tdd�|d<d|d	<d
|d<t�jdd
�|d<tjjtjjtj	��|d<|a
dS)z+Initialize the module as appropriate for NTr,rr4r�LIBDEST�
BINLIBDEST�	INCLUDEPYz.pyd�
EXT_SUFFIXz.exe�EXE�.r�VERSION�BINDIRN)r5r/rrmrr
�dirname�abspathr�
executablerI)r^rrr�_init_nt�s

%r�cGs�tdkr�t�jdtj�}|r5|�niattd<ttd<tjd�}|dk	rw|td<ntjdt�}tjdkr�tr�tj	j
t��}tj	j||�}q�tj	j
t��}ntj	j
tj	j|��td<tr~tjdkr~t}tj	jtd�r~|tj�kr~tj	j|td�}tj	j|�td<q~ntjd	kr�d
dl}|jt�q�n|r�g}x$|D]}|jtj|��q�W|StSdS)a�With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  On Unix, this means every variable defined in Python's
    installed Makefile; on Windows 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.
    NZ_init_r-�exec_prefixr��SOr!rr6r)rI�globalsr�rr'r3r2rr(r
r�rTrr�r*�isabs�getcwdrrFrG�customize_config_vars�append)�args�funcr�r!r.rG�valsr'rrrrJ�s@



"
rJcCs>|dkr.ddl}|jdtd�nt�j|�S)z�Return the value of a single variable using the dictionary
    returned by 'get_config_vars()'.  Equivalent to
    get_config_vars().get(name)
    r�rNz SO is deprecated, use EXT_SUFFIXrU)�warnings�warn�DeprecationWarningrJr�)r'r�rrrr)1sr)i����i����i�)rr)4�__doc__rrVrrgrr
r*r-r3r�r2�base_prefixr&�base_exec_prefixr%rKr�rr�r�r'�lowerr�pardirr�getattrr�endswithrr(r+�abiflags�AttributeErrorrr/r5rHrQrTrerWrkrorqr�r�rIr�r�rJr)rrrr�<module>
sf!+*++	
&+I
	m$J