%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/core/17212/usr/lib/python3.5/distutils/__pycache__/
Upload File :
Create Path :
Current File : //snap/core/17212/usr/lib/python3.5/distutils/__pycache__/sysconfig.cpython-35.pyc



|�g;S�
@s�dZddlZddlZddlZddlZddlZddlmZejj	ej
�Zejj	ej�Z
ejj	ej�Zejj	ej�Zdejkr�ejjejd�Zn!ejjejjej��Zejdkr4ej�jd,�r4ejjejje��Zd	d
�Zeedd�Zer�ejdkr�ej�jd-�r�ejjejje��Zdd
�Ze�ZdZyes�ej ZWne!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%�Z0d&d'�Z1d(d)�Z2d*d+�Z3dS).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.localZModulesTF)rr)�os�path�isfile�join)�d�fn�r�)/usr/lib/python3.5/distutils/sysconfig.py�_is_python_source_dir*s
$rZ_homecCstrtt�Stt�S)N)�	_sys_homer�project_baserrrr�
_python_build3s
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_versionEsrcCs|dkr|rtpt}tjdkr�tr�tp<t}|rI|Strmtjjtt	d��}ntjjt	d�d�}tjj
|�Sdt�t}tr�|r�ddl
}|jd�Stjj|d	|�Stjd
krtjj|d	�Stdtj��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�posixZ	AST_H_DIR�srcdirZInclude�pythonrZplatincludeZincluderzFI 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_flags�	sysconfigZget_pathr)�
plat_specific�prefix�baseZincdirZ
python_dirr$rrr�get_python_incMs*

r(cCs\|ptjj|�dk}|dkrX|rF|r=tp@t}n|rRtpUt}tjdkrtjj|ddt	��}|r�|S|r�dtj
kr�dtj
kr�d	tjkr�tj
tjkr�tjj|dd
d�Stjj|d�SnTtjd
krE|r,tjj|d�Stjj|dd�Sntdtj��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'.
    �/usr�
/usr/localNrZlibrZPYTHONUSERBASEZVIRTUAL_ENVZreal_prefixZpython3z
dist-packagesz
site-packagesrZLibz?I don't know where Python installs its library on platform '%s')r)r*)r	r
r"rr�EXEC_PREFIX�PREFIXrrr�environr�__dict__r&�base_prefixr)r%�standard_libr&Zis_default_prefixZ	libpythonrrr�get_python_libvs0r1cCsx|jdkrttjdkrMtd�sMddl}|jt�dtd<tddd	d
ddd
ddddd�\}}}}}}}}	}
}}}
dtj	krtj	d}tjdkrdtj	kr|j
|�r||t|�d�}|}dtj	kr#tj	d}tj
||gd�rq|jdd�}|jdd�}|jdd�}dtj	kr�tj	d}dtj	kr�tj	d}n
|d}dtj	kr�|dtj	d}n|
r�|d|
}d
tj	kr-|dtj	d
}|dtj	d
}n"|rO|d|}|d|}dtj	kr�|dtj	d}|dtj	d}|dtj	d}n0|r�|d|}|d|}|d|}dtj	kr�tj	d}	dtj	kr|	dtj	d}n|	d|
}|d|}|jd|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�TrueZCCZCXXZOPT�CFLAGSZCCSHAREDZLDSHAREDZSHLIB_SUFFIXZARZARFLAGSZCONFIGURE_CPPFLAGSZCONFIGURE_CFLAGSZCONFIGURE_LDFLAGSz	*-4.[0-8]z-fstack-protector-strongz-fstack-protectorZCPPz -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	r-�
startswith�len�fnmatch�filter�replaceZset_executablesZshared_lib_extension)r8r;ZccZcxxZoptZcflagsZccsharedZldsharedZshlib_suffixZarZar_flagsZconfigure_cppflagsZconfigure_cflagsZconfigure_ldflagsZnewccZcppr9Zcc_cmdrrrr<�sx

3




	r<cCsdtrBtjdkr3tjjtp'td�}qQtp<t}ntdd�}tjj|d�S)z2Return full pathname of installed pyconfig.h file.rZPCr%rz
pyconfig.h)r r	rr
rrrr()Zinc_dirrrr�get_config_h_filename�srDcCs�trtjjtptd�Stdddd�}djt�t	�}t
tjd�ro|dtjj
7}tjj||d�S)	zAReturn full pathname of installed Makefile from the Python build.ZMakefiler%rr0rzconfig-{}{}�
_multiarchz-%s)r r	r
rrrr1�formatrr#�hasattrr�implementationrE)Zlib_dirZconfig_filerrr�get_makefile_filename	srIcCs�|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�gZ	define_rxZundef_rx�line�m�n�vrrr�parse_config_hs(

rXz"([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@xt
|�D]}||}
tj|
�pbt
j|
�}|r2|jd�}d}||kr�t||�}n�||kr�d}n�|tjkr�tj|}nx||kr=|jd�r
|dd	�|kr
d}qKd||kr&d}qKt|d|�}nd||<}|r9|
|j�d	�}|
d	|j��||}
d
|kr�|
||<q9yt|
�}
Wn"t	k
r�|
j�||<YnX|
||<||=|jd�r9|dd	�|kr9|dd	�}||kr9|
||<q7||=q7Wq$W|j�x9|j�D]+\}}	t|	t�rX|	j�||<qXW|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�surrogateescapeNrJz$$r�$r4r5r7TFZPY_r)zCFLAGSzLDFLAGSzCPPFLAGS)Zdistutils.text_filerYrM�_variable_rxrNrO�striprCrPrQ�list�_findvar1_rx�search�_findvar2_rx�strr	r-r?�end�start�close�items�
isinstance�update)rrSrYrRZdoneZnotdonerTrUrVrWZtmpvZrenamed_variablesr�value�found�itemZafter�krrr�parse_makefile7s�$

	
	%		





rncCsyxrtj|�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)r`rarb�span�getrO)�s�varsrUZbegrdrrr�expand_makefile_vars�s7rscCs'ddlm}iatj|�dS)z7Initialize the module as appropriate for POSIX systems.r)�build_time_varsN)Z_sysconfigdatartr=ri)rtrrr�_init_posix�srucCs�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%rr0rZLIBDESTZ
BINLIBDESTZ	INCLUDEPY�
EXT_SUFFIXz.exeZEXE�.rZVERSIONZBINDIRN)
r1r(�_imp�extension_suffixesrrCr	r
�dirname�abspathr�
executabler=)rSrrr�_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_prefixrv�SOrrr2r)r=�globalsrpr	rr,r+rr r
rzrIrr{r"�isabs�getcwdrr:r;Zcustomize_config_vars�append)�args�funcrrr'r;Zvalsrrrrr>�s@



"

r>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)
    rrNz SO is deprecated, use EXT_SUFFIXrJ)�warnings�warn�DeprecationWarningr>rp)rr�rrrr!"sr!)rr)rr)4�__doc__rxr	rKrrArZrr
r"r&r,r~r+r/r�base_exec_prefixrr-r{rrzr|r�lower�endswithr�getattrrrr r#�abiflags�AttributeErrorrr(r1r<rDrIrXrLr]r`rbrnrsr=rur}r>r!rrrr�<module>
s\!	

).X
j	J

Zerion Mini Shell 1.0