Your IP : 3.145.12.100


Current Path : /opt/alt/python35/lib64/python3.5/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/distutils/__pycache__/sysconfig.cpython-35.pyc



��Yf�P�
@s�dZddlZddlZddlZddlZddlmZejjej	�Z
ejjej�Zejjej
�Zejjej�Zdejkr�ejjejd�Zn!ejjejjej��Zejdkr(ej�jd,�r(ejjejje��Zd	d
�Zeedd�Zer�ejdkr�ej�jd-�r�ejjejje��Zdd
�Ze�ZdZyes�ejZWne k
r�YnXdd�Z!dddd�Z"ddddd�Z#dd�Z$dd�Z%dd�Z&ddd�Z'ej(d�Z)ej(d�Z*ej(d�Z+dd d!�Z,d"d#�Z-da.d$d%�Z/d&d'�Z0d(d)�Z1d*d+�Z2dS).a�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\win32�\pcbuild\amd64cCs=x6dD].}tjjtjj|d|��rdSqWdS)N�
Setup.dist�Setup.local�ModulesTF)rr)�os�path�isfile�join)�d�fn�r�8/opt/alt/python35/lib64/python3.5/distutils/sysconfig.py�_is_python_source_dir)s
$r�_homecCstrtt�Stt�S)N)�	_sys_homer�project_baserrrr�
_python_build2s
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_versionDsrcCs�|dkr|rtpt}tjdkr�trn|rCtpBtStjjt	d�d�}tjj
|�Sdt�t}tjj|d|�Stjdkr�tjj|d�St
dtj��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�srcdirZInclude�python�includerzFI don't know where Python installs its C header files on platform '%s')�BASE_EXEC_PREFIX�BASE_PREFIXr
�name�python_buildrrrr
�get_config_var�normpathr�build_flagsr)�
plat_specific�prefixZincdirZ
python_dirrrr�get_python_incLs
r)cCs�|dkr9|r'|rtp!t}n|r3tp6t}tjdkr�|sT|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�librz
site-packagesrZLibz?I don't know where Python installs its library on platform '%s')
r r!�EXEC_PREFIX�PREFIXr
r"rr
rr)r'�standard_libr(r+Z	libpythonrrr�get_python_libos(	r/cCs�|jdkr�tjdkrMtd�sMddl}|jt�dtd<tddd	d
ddd
dd�	\	}}}}}}}}	}
dtj	kr�tj	d}tjdkr�dtj	kr�|j
|�r�||t|�d�}|}dtj	krtj	d}dtj	kr-tj	d}dtj	krLtj	d}n
|d}dtj	krz|dtj	d}d
tj	kr�|dtj	d
}|dtj	d
}dtj	kr|dtj	d}|dtj	d}|dtj	d}dtj	krtj	d}	dtj	krD|	dtj	d}
n|	d|
}
|d|}|jd|d|d|d|d|d|d|d|
�||_
dS)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)r>rAZccZcxxZoptZcflagsZccsharedZldsharedZshlib_suffix�arZar_flagsZnewccZcppr?Zcc_cmdrrrrB�s\

0




	rBcCsdtrBtjdkr3tjjtp'td�}qQtp<t}ntdd�}tjj|d�S)z2Return full pathname of installed pyconfig.h file.r�PCr'rz
pyconfig-64.h)r#r
r"rr
rrr))�inc_dirrrr�get_config_h_filename�srKcCs_trtjjtptd�Stdddd�}djt�t	�}tjj||d�S)zAReturn full pathname of installed Makefile from the Python build.�Makefiler'rr.rzconfig-{}{})
r#r
rr
rrr/�formatrr&)Zlib_dirZconfig_filerrr�get_makefile_filename�s
rNcCs�|dkri}tjd�}tjd�}x�|j�}|sFP|j|�}|r�|jdd�\}}yt|�}Wntk
r�YnX|||<q3|j|�}|r3d||jd�<q3W|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_h�s(

r_z"([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	krFi}i}i}x�|j�}|d	krnPtj|�}|rU|jdd
�\}}	|	j�}	|	jdd�}
d
|
kr�|	||<qUyt|	�}	Wn(t	k
r|	jdd
�||<YqUX|	||<qUWd}x;|r^x.t
|�D] }||}
tj|
�pbt
j|
�}|rP|jd�}d}||kr�t||�}n�||kr�d}n�|tjkr�tj|}nx||kr=|jd�r
|dd	�|kr
d}qKd||kr&d}qKt|d|�}nd||<}|rW|
|j�d	�}|
d	|j��}
|j�|
kr�|
|7}
|
|7}
d
|kr�|
||<qWyt|
�}
Wn"t	k
r�|
j�||<YnX|
||<||=|jd�rW|dd	�|krW|dd	�}||krW|
||<q7||=q7Wq$W|j�x9|j�D]+\}}	t|	t�rv|	j�||<qvW|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�surrogateescapeNrOz$$r�$r5r;r=TF�PY_r)r5r;r=)Zdistutils.text_filer`rR�_variable_rxrSrT�strip�replacerUrV�list�_findvar1_rx�search�_findvar2_rx�strr
rErF�end�start�close�items�
isinstance�update)rrXr`rW�done�notdoner[r\r]r^�tmpv�renamed_variablesr"�value�found�item�after�krrr�parse_makefiles�$

	
	%		







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)rirjrk�span�getrT)�s�varsr\Zbegrmrrr�expand_makefile_vars�s7r�cCs*i}yt�}t||�Wn[tk
r}}z;d|}t|d�r_|d|j}t|��WYdd}~XnXy0t�}t|��}t||�WdQRXWn[tk
r}z;d|}t|d�r�|d|j}t|��WYdd}~XnXt	r |d|d<|a
dS)z7Initialize the module as appropriate for POSIX systems.z.invalid Python installation: unable to open %s�strerrorz (%s)N�	BLDSHAREDr7)rNr|�OSError�hasattrr�rrK�openr_r#rC)rX�filename�msgZmy_msg�filerrr�_init_posix�s*	
	
r�cCs�i}tdddd�|d<tdddd�|d<tdd�|d<tj�d|d<d	|d
<t�jdd�|d
<tjjtjj	t
j��|d<|adS)z+Initialize the module as appropriate for NTr'rr.r�LIBDEST�
BINLIBDEST�	INCLUDEPY�
EXT_SUFFIXz.exe�EXE�.r�VERSION�BINDIRN)
r/r)�_imp�extension_suffixesrrgr
r�dirname�abspathr�
executablerC)rXrrr�_init_nt�s
%r�cGs�tdkr�t�jdtj�}|r5|�niattd<ttd<tjd�}|dk	rt|td<tjdt�}tjdkr�tr�tj	j
t��}tj	j||�}ntj	j
t��}tj	j
tj	j|��td<trrtjdkrrt}tj	jtd�rr|tj�krrtj	j|td�}tj	j|�td<tjd	kr�d
dl}|jt�|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��SOrrr0r)rC�globalsr~r
r"r-r,rr#rr�rNr
r�r%�isabs�getcwdrr@rA�customize_config_vars�append)�args�funcr�r�baserA�valsr"rrrrD�s@



"

rDcCs;|dkr+ddl}|jdtd�t�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_SUFFIXrO)�warnings�warn�DeprecationWarningrDr~)r"r�rrrr$%sr$)rr)rr)3�__doc__r�r
rPrrarrr%r(r-r�r,�base_prefixr!�base_exec_prefixr rEr�rr�r�r"�lower�endswithr�getattrrrr#r&�abiflags�AttributeErrorrr)r/rBrKrNr_rQrerirkr|r�rCr�r�rDr$rrrr�<module>
sZ!	

#+I
	m$J

?>