Your IP : 3.22.79.165


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.opt-2.pyc



$�Yf�P�
@s�ddlZddlZddlZddlZddlmZejjej�Z	ejjej
�Zejjej�Z
ejjej�Zdejkr�ejjejd�Zn!ejjejjej��Zejdkr"ej�jd+�r"ejjejje��Zdd	�Zeed
d�Zer�ejdkr�ej�jd,�r�ejjejje��Zdd�Ze�Zd
Zyes�ejZWnek
r�YnXdd�Z dddd�Z!ddddd�Z"dd�Z#dd�Z$dd�Z%ddd�Z&ej'd�Z(ej'd�Z)ej'd�Z*ddd �Z+d!d"�Z,da-d#d$�Z.d%d&�Z/d'd(�Z0d)d*�Z1dS)-�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�./opt/alt/python35/lib64/python3.5/sysconfig.py�_is_python_source_dir)s
$r�_homecCstrtt�Stt�S)N)�	_sys_homer�project_baserrrr�
_python_build2s
r�cCstjdd�S)N�)�sys�versionrrrr�get_python_versionDsrcCs�|dkr|rtpt}tjdkr�trn|rCtpBtStjjt	d�d�}tjj
|�Sdt�t}tjj|d|�Stjdkr�tjj|d�St
dtj��dS)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	dtj��dS)	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<tdddd	d
ddd
d�	\	}}}}}}}}	}
dtj	kr�tj	d}tjdkr�dtj	kr�|j
|�r�||t|�d�}|}dtj	krtj	d}dtj	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}d
tj	krtj	d
}	dtj	krD|	dtj	d}
n|	d|
}
|d|}|jd|d|d|d|d|d|d|d|
�||_
dS)NZunix�darwinZCUSTOMIZED_OSX_COMPILERr�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>rAZccZcxx�optZcflagsZccsharedZldsharedZshlib_suffix�arZar_flagsZnewccZcppr?Zcc_cmdrrrrB�s\

0




	rBcCsdtrBtjdkr3tjjtp'td�}qQtp<t}ntdd�}tjj|d�S)Nr�PCr'rz
pyconfig.h)r#r
r"rr
rrr))�inc_dirrrr�get_config_h_filename�srLcCs_trtjjtptd�Stdddd�}djt�t	�}tjj||d�S)N�Makefiler'rr.rzconfig-{}{})
r#r
rr
rrr/�formatrr&)Zlib_dirZconfig_filerrr�get_makefile_filename�s
rOcCs�|dkri}tjd�}tjd�}x�|j�}|sFP|j|�}|r�|jdd�\}}yt|�}Wntk
r�YnX|||<q3|j|�}|r3d||jd�<q3W|S)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�}|dkrFi}i}i}x�|j�}|dkrnPtj|�}|rU|jdd	�\}}	|	j�}	|	jd
d�}
d|
kr�|	||<qUyt|	�}	Wn(t	k
r|	jd
d�||<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)Nr)�TextFileZstrip_commentsrZskip_blanksZ
join_lines�errors�surrogateescaperPz$$r�$r5r;r=TF�PY_r)r5r;r=)Zdistutils.text_filerarS�_variable_rxrTrU�strip�replacerVrW�list�_findvar1_rx�search�_findvar2_rx�strr
rErF�end�start�close�items�
isinstance�update)rrYrarX�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)Nrr)rjrkrl�span�getrU)�s�varsr]Zbegrnrrr�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)Nz.invalid Python installation: unable to open %s�strerrorz (%s)�	BLDSHAREDr7)rOr}�OSError�hasattrr�rrL�openr`r#rC)rY�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)Nr'rr.r�LIBDEST�
BINLIBDEST�	INCLUDEPY�
EXT_SUFFIXz.exe�EXE�.r�VERSION�BINDIR)
r/r)�_imp�extension_suffixesrrhr
r�dirname�abspathr�
executablerC)rYrrr�_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<tjdkr�d	dl}|jt�|r�g}x$|D]}|jtj|��q�W|StSdS)
NZ_init_r(�exec_prefixr��SOrrr0r)rC�globalsrr
r"r-r,rr#rr�rOr
r�r%�isabs�getcwdrr@rA�customize_config_vars�append)�args�funcr�r�baserA�valsr"rrrrD�s@



"

rDcCs;|dkr+ddl}|jdtd�t�j|�S)Nr�rz SO is deprecated, use EXT_SUFFIXrP)�warnings�warn�DeprecationWarningrDr)r"r�rrrr$%sr$)rr)rr)2r�r
rQrrbrrr%r(r-r�r,�base_prefixr!�base_exec_prefixr rEr�rr�r�r"�lower�endswithr�getattrrrr#r&�abiflags�AttributeErrorrr)r/rBrLrOr`rRrfrjrlr}r�rCr�r�rDr$rrrr�<module>sX!	

#+I
	m$J

?>