Your IP : 18.221.147.141


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



��Yf�_�@s�dZddlZddlZddlmZmZdddddd	d
ddd
dgZdddddddddddddddddid dd!dd"dd"dd"dd#dd#ddddid$dd%dd&dd'dd'dd(dd(dd)ddid*dd+dd+dd,dd,dd-dd.dd/id0dd1dd1dd2dd3dd4dd5dd/id6dd7dd7dd8dd8dd9dd5dd/iiZdlZej	j
�dZej	dd:�Zeded;Z
ejjej�Zejjej�Zejjej�Zejjej�ZdadZd<d=�Zejrdejjeej��Zneej��Zejd$kr�ej �j!dm�r�eejj"eee��Zd@ej#kr�eej#d@�ZdAdB�Z$e%edCd�Z&e&r@ejd$kr@e&j �j!dn�r@ejjejje&��Z&dDdEdF�Z'e'dG�Z(e(r�x*doD]"Z)dHee)d<dIee)d<qhWdJdK�Z*dLdM�Z+dNdO�Z,dPdQ�Z-dRdS�Z.ddTdU�Z/dVd�Z0dWdX�Z1dYdZ�Z2d[d\�Z3dd]d�Z4d^d�Z5d_d
�Z6d`d	�Z7e-�ddGdad
�Z8e-�ddGdbd�Z9dcd�Z:ddd�Z;ded�Z<dfd�Z=dgdh�Z>didj�Z?e@dkkr�e?�dS)pz-Access to Python's configuration information.�N)�pardir�realpath�get_config_h_filename�get_config_var�get_config_vars�get_makefile_filename�get_path�get_path_names�	get_paths�get_platform�get_python_version�get_scheme_names�parse_config_h�posix_prefix�stdlibz/{installed_base}/lib64/python{py_version_short}�
platstdlibz){platbase}/lib64/python{py_version_short}�purelibz1{base}/lib/python{py_version_short}/site-packages�platlibz7{platbase}/lib64/python{py_version_short}/site-packages�includez;{installed_base}/include/python{py_version_short}{abiflags}�platincludez?{installed_platbase}/include/python{py_version_short}{abiflags}�scriptsz
{base}/bin�dataz{base}�
posix_homez{installed_base}/lib/pythonz{base}/lib/pythonz{installed_base}/include/python�ntz{installed_base}/Libz
{base}/Libz{base}/Lib/site-packagesz{installed_base}/Includez{base}/Scripts�nt_userz#{userbase}/Python{py_version_nodot}z1{userbase}/Python{py_version_nodot}/site-packagesz+{userbase}/Python{py_version_nodot}/Includez+{userbase}/Python{py_version_nodot}/Scriptsz
{userbase}�
posix_userz){userbase}/lib64/python{py_version_short}z5{userbase}/lib/python{py_version_short}/site-packagesz7{userbase}/lib64/python{py_version_short}/site-packagesz+{userbase}/include/python{py_version_short}z{userbase}/bin�osx_framework_userz{userbase}/lib/pythonz#{userbase}/lib/python/site-packagesz{userbase}/include��cCs+yt|�SWntk
r&|SYnXdS)N)r�OSError)�path�r!�./opt/alt/python35/lib64/python3.5/sysconfig.py�_safe_realpathcs
r#�\pcbuild\win32�\pcbuild\amd64Z_PYTHON_PROJECT_BASEcCs=x6dD].}tjjtjj|d|��rdSqWdS)N�
Setup.dist�Setup.local�ModulesTF)r&r')�osr �isfile�join)�d�fnr!r!r"�_is_python_source_dirxs
$r.�_homeFcCs |rtrtt�Stt�S)N)�	_sys_homer.�
_PROJECT_BASE)�
check_homer!r!r"�is_python_build�s
r3Tz{srcdir}/Includez{projectbase}/.cCsvy|j|�SWn^tk
rqy|jtj�SWn5tk
rl}ztd|��WYdd}~XnXYnXdS)Nz{%s})�format�KeyErrorr)�environ�AttributeError)�s�
local_vars�varr!r!r"�_subst_vars�s
r;cCsF|j�}x3|j�D]%\}}||kr4q|||<qWdS)N)�keys�items)�target_dict�
other_dict�target_keys�key�valuer!r!r"�_extend_dict�s
rCcCs�i}|dkri}t|t��x^t|j�D]L\}}tjdkrftjj|�}tjjt	||��||<q9W|S)N�posixr)rDr)
rCr�_INSTALL_SCHEMESr=r)�namer �
expanduser�normpathr;)�scheme�vars�resrArBr!r!r"�_expand_vars�s#rLcCstjdkrdStjS)NrDr)r)rFr!r!r!r"�_get_default_scheme�srMcCs�tjjdd�}dd�}tjdkr_tjjd�pEd}|rR|S||d�Stjdkr�td	�}|r�|r�|S|dd
|dtjdd��S|r�|S|dd
�SdS)N�PYTHONUSERBASEcWstjjtjj|��S)N)r)r rGr+)�argsr!r!r"�joinuser�sz_getuserbase.<locals>.joinuserr�APPDATA�~�Python�darwin�PYTHONFRAMEWORK�Libraryz%d.%drz.local)r)r6�getrF�sys�platformr�version_info)�env_baserP�base�	frameworkr!r!r"�_getuserbase�s"
r^cCsmddl}|jd�}|jd�}|jd�}|dkrKi}i}i}t|dd��}|j�}	WdQRXx�|	D]�}
|
jd�s�|
j�d	kr�q�|j|
�}|r�|jd
d�\}}
|
j�}
|
jdd	�}d
|kr|
||<q�yt	|
�}
Wn(t
k
rN|
jdd
�||<Yq�X|
||<q�Wt|j��}d}x�t
|�dkrx�t|�D]�}||}|j|�}|j|�}|r�|r�|j�|j�kr�|n|}n|r|n|}|dk	r|jd
�}d}||krJt||�}n�||kr_d}n�|tjkr~tj|}nx||kr�|jd�r�|dd�|kr�d	}q�d||kr�d}q�t|d|�}nd	||<}|r||j�d�}|d|j��}|j�|krD||7}||7}d
|krg|||<qyt	|�}Wn"t
k
r�|j�||<YnX|||<|j|�|jd�r|dd�|kr|dd�}||kr|||<q�|||<|j|�q�WqxWx9|j�D]+\}}
t|
t�r-|
j�||<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.
    rNz"([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_]*)}�errors�surrogateescape�#��rz$$�$�CFLAGS�LDFLAGS�CPPFLAGSTF�PY_r)rerfrg)�re�compile�open�	readlines�
startswith�strip�match�group�replace�int�
ValueError�listr<�len�tuple�search�start�strr)r6�end�remover=�
isinstance�update)�filenamerJri�_variable_rx�_findvar1_rx�_findvar2_rx�done�notdone�f�lines�line�m�n�v�tmpv�	variables�renamed_variablesrFrB�m1�m2�found�item�after�kr!r!r"�_parse_makefile�s�	
!


'			








r�cCsftrtjjtptd�Sttd�rDdttj	f}nd}tjjt
d�|d�S)z Return the path of the Makefile.�Makefile�abiflagszconfig-%s%s�configr)�
_PYTHON_BUILDr)r r+r0r1�hasattrrX�_PY_VERSION_SHORTr�r)�config_dir_namer!r!r"rOsc,CsSddl}i}t�}yt||�Wn[tk
r�}z;d|}t|d�rk|d|j}t|��WYdd}~XnXt�}y't|��}t||�WdQRXWn[tk
r}z;d|}t|d�r�|d|j}t|��WYdd}~XnXt	r,|d|d<d}d	t
jkrrddl}|j
|�}	||	_|	t
j|<d
t�t
jdd�f}
tt
d�r�|
d
7}
tj|
dd�tjj|
|d�}t|ddd��4}|jd�|jd�|j|d|�WdQRXtdddd��}|j|
�WdQRXdS)z;Generate the Python module containing build-time variables.rNz.invalid Python installation: unable to open %s�strerrorz (%s)�LDSHARED�	BLDSHARED�_sysconfigdatarTzbuild/lib.%s-%sr�gettotalrefcountz-pydebug�exist_okTz.py�w�encoding�utf8zB# system configuration generated and used by the sysconfig module
zbuild_time_vars = �streamzpybuilddir.txt�ascii)�pprintrr�rr�r�rrkrr�rXrY�types�
ModuleType�build_time_vars�modulesr�versionr)�makedirsr r+�write)r�rJ�makefile�e�msg�config_hr�rFr��module�
pybuilddir�destfiler!r!r"�_generate_posix_varsYsL	
	

	
 


r�cCs!ddlm}|j|�dS)z7Initialize the module as appropriate for POSIX systems.r)r�N)r�r�r})rJr�r!r!r"�_init_posix�sr�cCsqtd�|d<td�|d<td�|d<d|d<d	|d
<t|d<tjjttj��|d<d
S)z+Initialize the module as appropriate for NTr�LIBDESTr�
BINLIBDESTr�	INCLUDEPYz.pyd�
EXT_SUFFIXz.exe�EXE�VERSION�BINDIRN)r�_PY_VERSION_SHORT_NO_DOTr)r �dirnamer#rX�
executable)rJr!r!r"�_init_non_posix�s


r�c	Cs�|dkri}ddl}|jd�}|jd�}x�|j�}|sRP|j|�}|r�|jdd�\}}yt|�}Wntk
r�YnX|||<q?|j|�}|r?d||jd�<q?W|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.
    Nrz"#define ([A-Z][A-Za-z0-9_]+) (.*)
z&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
rcr)rirj�readlinerorprrrs)	�fprJri�	define_rx�undef_rxr�r�r�r�r!r!r"r�s*

cCsatrBtjdkr3tjjtp'td�}qNtp<t}ntd�}tjj|d�S)zReturn the path of pyconfig.h.r�PCrz
pyconfig-64.h)r�r)rFr r+r0r1r)�inc_dirr!r!r"r�scCsttt��S)z,Return a tuple containing the schemes names.)rv�sortedrEr!r!r!r"r
�scCstS)z*Return a tuple containing the paths names.)�_SCHEME_KEYSr!r!r!r"r	�scCs|rt||�St|SdS)z�Return 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)rLrE)rIrJ�expandr!r!r"r
�s
cCst|||�|S)z[Return a path corresponding to the scheme.

    ``scheme`` is the install scheme name.
    )r
)rFrIrJr�r!r!r"r�scGs�tdkr�iattd<ttd<ttd<ttd<tdtdtd<ttd	<ttd
<ttd<ttd<ttd
<ytj	td<Wnt
k
r�dtd<YnXtjdkr�t
t�tjdkr�tt�tjd�}|dk	r	|td<t�td<tjdt�}tjdkrtrjtjjt��}tjj||�}ntjjt��}t|�td<tjdkr�ddl}|jt�|r�g}x$|D]}|jtj|��q�W|StSdS)anWith 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 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.
    N�prefix�exec_prefix�
py_version�py_version_shortrr�py_version_nodot�installed_baser\�installed_platbase�platbase�projectbaser�rbrrDr��SO�userbase�srcdirrT)�_CONFIG_VARS�_PREFIX�_EXEC_PREFIX�_PY_VERSIONr��_BASE_PREFIX�_BASE_EXEC_PREFIXr1rXr�r7r)rFr�r�rWr^r�r r�rr+r#rY�_osx_support�customize_config_vars�append)rOr�r�r\r��valsrFr!r!r"r�sP















cCs;|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_SUFFIXr)�warnings�warn�DeprecationWarningrrW)rFr�r!r!r"rEscCs�tjdkr�d}tjj|�}|d*kr:tjStjjd|�}tj|t|�|�j�}|dkr�dS|dkr�dStjStjd	ks�ttd
�r�tjSdtj	kr�tj	dStj
�\}}}}}|j�jdd
�}|jdd�}|jdd�}|dd�dkrTd||fS|dd�dkr�|ddkr�d}dt|d�d|dd�f}ddddi}	|d |	tj
7}n�|dd!�d"kr�d||fS|dd�d#krd$|||fS|dd%�d&krxd&}ddl}
|
jd'�}|j|�}|r�|j�}nF|dd%�d(kr�ddl}
|
jt�|||�\}}}d)|||fS)+a�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'.
    rz bit (rc�)�amd64z	win-amd64�itaniumzwin-ia64rD�uname�_PYTHON_HOST_PLATFORM�/rb� �_�-N��linuxz%s-%s�sunosr�5�solarisz%d.%srri����32bitl�����64bitz.%s��irix�aixz%s-%s.%s��cygwinz[\d.]+rTz%s-%s-%s���)r)rFrXr��findrYru�lowerr�r6r�rqrr�maxsizerirjrorpr��get_platform_osxr)r��i�j�look�osname�host�releaser��machine�bitnessri�rel_rer�r�r!r!r"rQsZ#(cCstS)N)r�r!r!r!r"r�scCsaxZtt|j���D]@\}\}}|dkrEtd|�td||f�qWdS)Nrz%s: z
	%s = "%s")�	enumerater�r=�print)�titler�indexrArBr!r!r"�_print_dict�s+rcCsdtjkrt�dStdt��tdt��tdt��t�tdt��t�tdt	��dS)z*Display all information sysconfig detains.z--generate-posix-varsNzPlatform: "%s"zPython version: "%s"z!Current installation scheme: "%s"�Paths�	Variables)
rX�argvr�rrrrMrr
rr!r!r!r"�_main�sr�__main__)rrrrrrr)r$r%)r$r%)rr)A�__doc__r)rXZos.pathrr�__all__rEr�r��splitr�r�r�r rHr�r��base_prefixr�r�r��base_exec_prefixr�r��
_USER_BASEr#r�r�r1�getcwdrFr��endswithr+r6r.�getattrr0r3r�rIr;rCrLrMr^r�rr�r�r�rrr
r	r
rrrrrrr�__name__r!r!r!r"�<module>s�							
	

? M[

?>