b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 172.67.192.52 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 / distutils / command /
Filename/usr/lib64/python2.6/distutils/command/config.pyo
Size12.5 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 13:07
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc @sÀdZdZddkZddkZddkZddkZddkTddklZddk l
Z
ddk l Z ddk
lZhd d
6d d 6Zd
efd��YZed�ZdS(sêdistutils.command.config

Implements the Distutils 'config' command, a (mostly) empty command class
that exists mainly to be sub-classed by specific module distributions and
applications. The idea is that while every "config" command is different,
at least they're all named the same, and users always see "config" in the
list of standard commands. Also, this is a good place to put common
configure-like tasks: "try to compile this C code", or "figure out where
this header file lives".
s2$Id: config.py 37828 2004-11-10 22:23:15Z loewis $iÿÿÿÿN(t*(tCommand(tDistutilsExecError(tcustomize_compiler(tlogs.ctcs.cxxsc++tconfigc Bs.eZdZd,d-d.d/d0d1d2d3d4g Zd�Zd�Zd�Zd�Zd�Z d�Z
d�Z d�Z d �Z
d+d+d+d!d"�Zd+d+d+d!d#�Zd+d+d!d$�Zd+d+d+d+d!d%�Zd+d+d+d+d!d&�Zd+d+d+d+d'd'd(�Zd+d+d+gd)�Zd+d+d!d*�ZRS(5sprepare to builds compiler=sspecify the compiler typescc=sspecify the compiler executables
include-dirs=tIs.list of directories to search for header filessdefine=tDsC preprocessor macros to definesundef=tUs!C preprocessor macros to undefines
libraries=tls!external C libraries to link withs
library-dirs=tLs.directories to search for external C librariestnoisys1show every action (compile, link, run, ...) takens dump-sources=dump generated source files before attempting to compile themcCsLd|_d|_d|_d|_d|_d|_d|_g|_dS(Ni( tNonetcompilertcct include_dirst librariest library_dirsR t dump_sourcet
temp_files(tself((s0/usr/lib64/python2.6/distutils/command/config.pytinitialize_options8s       cCsû|idjo|iipg|_n6t|i�tjoti|iti�|_n|i djo
g|_ n*t|i �tjo|i g|_ n|i
djo
g|_
n6t|i
�tjoti|i
ti�|_
ndS(N( RR
t distributionttypet
StringTypetstringtsplittostpathsepRR(R((s0/usr/lib64/python2.6/distutils/command/config.pytfinalize_optionsIs

cCsdS(N((R((s0/usr/lib64/python2.6/distutils/command/config.pytrunZscCsÅddkl}l}t|i|�p�|d|id|idd�|_t|i�|io|ii|i�n|i o|ii
|i �n|i o|ii |i �qÁndS(s^Check that 'self.compiler' really is a CCompiler object;
if not, make it one.
iÿÿÿÿ(t CCompilert new_compilerRtdry_runtforceiN(
tdistutils.ccompilerR R!t
isinstanceRR"RRtset_include_dirsRt
set_librariesRtset_library_dirs(RR R!((s0/usr/lib64/python2.6/distutils/command/config.pyt_check_compilerbs



cCs�dt|}t|d�}|o3x|D]}|id|�q+W|id�n|i|�|ddjo|id�n|i�|S(Nt _configtesttws#include <%s>
s
iÿÿÿÿ(tLANG_EXTtopentwritetclose(Rtbodytheaderstlangtfilenametfiletheader((s0/usr/lib64/python2.6/distutils/command/config.pyt_gen_temp_sourcefileus

cCsT|i|||�}d}|ii||g�|ii||d|�||fS(Ns
_configtest.iR(R6RtextendRt
preprocess(RR0R1RR2tsrctout((s0/usr/lib64/python2.6/distutils/command/config.pyt _preprocess�s
cCs�|i|||�}|iot|d|�n|ii|g�\}|ii||g�|ii|gd|�||fS(Nscompiling '%s':R(R6Rt dump_fileRtobject_filenamesRR7tcompile(RR0R1RR2R9tobj((s0/usr/lib64/python2.6/distutils/command/config.pyt_compile�s
c
Cs¬|i||||�\}}tiitii|��d} |ii|g| d|d|d|�|iidj o| |ii} n|i i
| �||| fS(NiRRt target_lang( R@RtpathtsplitexttbasenameRtlink_executablet
exe_extensionR
Rtappend(
RR0R1RRRR2R9R?tprog((s0/usr/lib64/python2.6/distutils/command/config.pyt_link�s"cGsr|p|i}g|_ntidti|��x5|D]-}yti|�Wq=tj
oq=Xq=WdS(Ns removing: %s(RRtinfoRtjoinRtremovetOSError(Rt filenamesR3((s0/usr/lib64/python2.6/distutils/command/config.pyt_clean¢s 
Rc Csdddkl}|i�d}y|i||||�Wn|j
o
d}nX|i�|S(sQConstruct a source file from 'body' (a string containing lines
of C/C++ code) and 'headers' (a list of header files to include)
and run it through the preprocessor. Return true if the
preprocessor succeeded, false if there were any errors.
('body' probably isn't of much use, but what the heck.)
iÿÿÿÿ(t CompileErrorii(R$RPR)R;RO(RR0R1RR2RPtok((s0/usr/lib64/python2.6/distutils/command/config.pyttry_cpp¸s
 
c Cs·|i�|i||||�\}}t|�tjoti|�}nt|�}d} x<|i�}
|
djoPn|i|
�o d} Pqcqc|i �|i
�| S(s´Construct a source file (just like 'try_cpp()'), run it through
the preprocessor, and return true if any line of the output matches
'pattern'. 'pattern' should either be a compiled regex object or a
string containing a regex. If both 'body' and 'headers' are None,
preprocesses an empty file -- which can be useful to determine the
symbols the preprocessor and compiler set by default.
iti( R)R;RRtreR>R-treadlinetsearchR/RO( RtpatternR0R1RR2R9R:R4tmatchtline((s0/usr/lib64/python2.6/distutils/command/config.pyt
search_cppÊs

  


c Csddkl}|i�y |i||||�d}Wn|j
o
d}nXti|odpd�|i�|S(swTry to compile a source file built from 'body' and 'headers'.
Return true on success, false otherwise.
iÿÿÿÿ(RPiissuccess!sfailure.(R$RPR)R@RRJRO(RR0R1RR2RPRQ((s0/usr/lib64/python2.6/distutils/command/config.pyt try_compileès

 
c
Cs�ddkl}l}|i�y&|i||||||�d} Wn||fj
o
d} nXti| odpd�|i�| S(s�Try to compile and link a source file, built from 'body' and
'headers', to executable form. Return true on success, false
otherwise.
iÿÿÿÿ(RPt LinkErroriissuccess!sfailure.(R$RPR\R)RIRRJRO(
RR0R1RRRR2RPR\RQ((s0/usr/lib64/python2.6/distutils/command/config.pyttry_linkøs


 
c
Cs¯ddkl}l}|i�yA|i||||||�\} }
} |i| g�d} Wn"||tfj
o
d} nXti| odpd�|i �| S(s�Try to compile, link to an executable, and run a program
built from 'body' and 'headers'. Return true on success, false
otherwise.
iÿÿÿÿ(RPR\iissuccess!sfailure.(
R$RPR\R)RItspawnRRRJRO(
RR0R1RRRR2RPR\R9R?texeRQ((s0/usr/lib64/python2.6/distutils/command/config.pyttry_run
s

 
ic Cs¢|i�g}|o|id|�n|id�|o|id|�n|id|�|id�ti|d�d}|i|||||�S(sÛDetermine if function 'func' is available by constructing a
source file that refers to 'func', and compiles and links it.
If everything succeeds, returns true; otherwise returns false.

The constructed source file starts out by including the header
files listed in 'headers'. If 'decl' is true, it then declares
'func' (as "int func()"); you probably shouldn't supply 'headers'
and set 'decl' true in the same call, or you might get errors about
a conflicting declarations for 'func'. Finally, the constructed
'main()' function either references 'func' or (if 'call' is true)
calls it. 'libraries' and 'library_dirs' are used when
linking.
s
int %s ();s
int main () {s %s();s %s;t}s
(R)RGRRKR]( RtfuncR1RRRtdecltcallR0((s0/usr/lib64/python2.6/distutils/command/config.pyt
check_func(s


cCs*|i�|id|||g||�S(sáDetermine if 'library' is available to be linked against,
without actually checking that any particular symbols are provided
by it. 'headers' will be used in constructing the source file to
be compiled, but the only effect of this is to check if all the
header files listed are available. Any libraries listed in
'other_libraries' will be included in the link, in case 'library'
has symbols that depend on other libraries.
sint main (void) { }(R)R](RtlibraryRR1Rtother_libraries((s0/usr/lib64/python2.6/distutils/command/config.pyt check_libLs

 cCs|iddd|gd|�S(s¤Determine if the system header file named by 'header_file'
exists and can be found by the preprocessor; return true if so,
false otherwise.
R0s
/* No body */R1R(RR(RR5RRR2((s0/usr/lib64/python2.6/distutils/command/config.pyt check_header[sN(s compiler=Nsspecify the compiler type(scc=Nsspecify the compiler executable(s
include-dirs=Rs.list of directories to search for header files(sdefine=RsC preprocessor macros to define(sundef=R s!C preprocessor macros to undefine(s
libraries=R
s!external C libraries to link with(s
library-dirs=R s.directories to search for external C libraries(snoisyNs1show every action (compile, link, run, ...) taken(s dump-sourceNs=dump generated source files before attempting to compile them(t__name__t
__module__t descriptionR
t user_optionsRRRR)R6R;R@RIRORRRZR[R]R`ReRhRi(((s0/usr/lib64/python2.6/distutils/command/config.pyRsZ     
    !cCsO|djo
|dGHn|GHt|�}tii|i��|i�dS(Nt:(R
R-tsyststdoutR.treadR/(R3theadR4((s0/usr/lib64/python2.6/distutils/command/config.pyR<hs 

 (t__doc__t __revision__RoRRRTttypestdistutils.coreRtdistutils.errorsRtdistutils.sysconfigRt distutilsRR,RR
R<(((s0/usr/lib64/python2.6/distutils/command/config.pyt<module>
s0


ÿO