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



YfP
@sdZddlZddlZddlZddlZddlmZejjej	Z
ejjejZejjej
ZejjejZdejkrejjejdZn!ejjejjejZejdkr(ejjd,r(ejjejjeZd	d
ZeeddZerejdkrejjd-rejjejjeZdd
ZeZdZyesejZWne k
rYnXddZ!ddddZ"dddddZ#ddZ$ddZ%ddZ&dddZ'ej(dZ)ej(dZ*ej(dZ+dd d!Z,d"d#Z-da.d$d%Z/d&d'Z0d(d)Z1d*d+Z2dS).aProvide 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_BASEnt\pcbuild\win32\pcbuild\amd64cCs=x6dD].}tjjtjj|d|rdSqWdS)N
Setup.distSetup.localModulesTF)rr)ospathisfilejoin)dfnr8/opt/alt/python35/lib64/python3.5/distutils/sysconfig.py_is_python_source_dir)s
$r_homecCstrttSttS)N)	_sys_homerproject_baserrrr
_python_build2s
rcCstjddS)zReturn a string containing the major and minor Python version,
    leaving off the patchlevel.  Sample return values could be '1.5'
    or '2.2'.
    N)sysversionrrrrget_python_versionDsrcCs|dkr|rtpt}tjdkrtrn|rCtpBtStjjt	dd}tjj
|Sdtt}tjj|d|Stjdkrtjj|dSt
dtjdS)	aReturn 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'.
    NposixsrcdirZIncludepythonincluderzFI don't know where Python installs its C header files on platform '%s')BASE_EXEC_PREFIXBASE_PREFIXr
namepython_buildrrrr
get_config_varnormpathrbuild_flagsr)
plat_specificprefixZincdirZ
python_dirrrrget_python_incLs
r)cCs|dkr9|r'|rtp!t}n|r3tp6t}tjdkr|sT|r]d}nd}tjj||dt}|r|Stjj|dSnTtjdkr|rtjj|dStjj|ddSnt	d	tjdS)
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'.
    Nrlib64librz
site-packagesrZLibz?I don't know where Python installs its library on platform '%s')
r r!EXEC_PREFIXPREFIXr
r"rr
rr)r'standard_libr(r+Z	libpythonrrrget_python_libos(	r/cCs|jdkrtjdkrMtdsMddl}|jtdtd<tddd	d
ddd
dd	\	}}}}}}}}	}
dtj	krtj	d}tjdkrd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)zDo 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.
    ZunixdarwinZCUSTOMIZED_OSX_COMPILERrNTrueCCCXXOPTCFLAGSCCSHAREDLDSHAREDSHLIB_SUFFIXARARFLAGSZCPPz -ELDFLAGS CPPFLAGSZpreprocessorcompilerZcompiler_soZcompiler_cxxZ	linker_soZ
linker_exearchiver)Z
compiler_typerplatformr$_osx_supportcustomize_compiler_config_varsget_config_varsr
environ
startswithlenZset_executablesZshared_lib_extension)r>rAZccZcxxZoptZcflagsZccsharedZldsharedZshlib_suffixarZar_flagsZnewccZcppr?Zcc_cmdrrrrBs\

0




	rBcCsdtrBtjdkr3tjjtp'td}qQtp<t}ntdd}tjj|dS)z2Return full pathname of installed pyconfig.h file.rPCr'rz
pyconfig-64.h)r#r
r"rr
rrr))inc_dirrrrget_config_h_filenamesrKcCs_trtjjtptdStdddd}djtt	}tjj||dS)zAReturn full pathname of installed Makefile from the Python build.Makefiler'rr.rzconfig-{}{})
r#r
rr
rrr/formatrr&)Zlib_dirZconfig_filerrrget_makefile_filenames
rNcCs|dkri}tjd}tjd}x|j}|sFP|j|}|r|jdd\}}yt|}Wntk
rYnX|||<q3|j|}|r3d||jd<q3W|S)zParse 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_]+) [*]/
rr)recompilereadlinematchgroupint
ValueError)fpg	define_rxundef_rxlinemnvrrrparse_config_hs(

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Csddlm}||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}||krt||}n||krd}n|tjkrtj|}nx||kr=|jdr
|dd	|kr
d}qKd||kr&d}qKt|d|}nd||<}|rW|
|jd	}|
d	|j}
|j|
kr|
|7}
|
|7}
d
|kr|
||<qWyt|
}
Wn"t	k
r|
j||<YnX|
||<||=|jdrW|dd	|krW|dd	}||krW|
||<q7||=q7Wq$W|jx9|jD]+\}}	t|	trv|	j||<qvW|j||S)zParse 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_lineserrorssurrogateescapeNrOz$$r$r5r;r=TFPY_r)r5r;r=)Zdistutils.text_filer`rR_variable_rxrSrTstripreplacerUrVlist_findvar1_rxsearch_findvar2_rxstrr
rErFendstartcloseitems
isinstanceupdate)rrXr`rWdonenotdoner[r\r]r^tmpvrenamed_variablesr"valuefounditemafterkrrrparse_makefiles$

	
	%		







r|cCsyxrtj|ptj|}|rp|j\}}|d||j|jd||d}qPqW|S)aExpand 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)rirjrkspangetrT)svarsr\Zbegrmrrrexpand_makefile_varss7rcCs*i}yt}t||Wn[tk
r}}z;d|}t|dr_|d|j}t|WYdd}~XnXy0t}t|}t||WdQRXWn[tk
r}z;d|}t|dr|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 %sstrerrorz (%s)N	BLDSHAREDr7)rNr|OSErrorhasattrrrrKopenr_r#rC)rXfilenamemsgZmy_msgfilerrr_init_posixs*	
	
rcCsi}tdddd|d<tdddd|d<tdd|d<tjd|d<d	|d
<tjdd|d
<tjjtjj	t
j|d<|adS)z+Initialize the module as appropriate for NTr'rr.rLIBDEST
BINLIBDEST	INCLUDEPY
EXT_SUFFIXz.exeEXE.rVERSIONBINDIRN)
r/r)_impextension_suffixesrrgr
rdirnameabspathr
executablerC)rXrrr_init_nts
%rcGstdkrtjdtj}|r5|niattd<ttd<tjd}|dk	rt|td<tjdt}tjdkrtrtj	j
t}tj	j||}ntj	j
t}tj	j
tj	j|td<trrtjdkrrt}tj	jtdrr|tjkrrtj	j|td}tj	j|td<tjd	krd
dl}|jt|rg}x$|D]}|jtj|qW|StSdS)aWith 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_prefixrSOrrr0r)rCglobalsr~r
r"r-r,rr#rrrNr
rr%isabsgetcwdrr@rAcustomize_config_varsappend)argsfuncrrbaserAvalsr"rrrrDs@



"

rDcCs;|dkr+ddl}|jdtdtj|S)zReturn 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_SUFFIXrO)warningswarnDeprecationWarningrDr~)r"rrrrr$%sr$)rr)rr)3__doc__rr
rPrrarrr%r(r-rr,base_prefixr!base_exec_prefixr rErrrrr"lowerendswithrgetattrrrr#r&abiflagsAttributeErrorrr)r/rBrKrNr_rQrerirkr|rrCrrrDr$rrrr<module>
sZ!	

#+I
	m$J
Back to Directory File Manager