KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/lib64/python2.4/distutils/command/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.4/distutils/command/config.pyc
mò
‚=5Dc@s©dZdZdkZdkZdkZdkZdkTdklZdk	l
Z
dklZdk
lZhdd	<d
d<Zd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 $N(t*(sCommand(sDistutilsExecError(scustomize_compiler(slogtcs.csc++s.cxxtconfigcBs.tZdZd,d-d.d/d0d1d2d3d4g	Zd„Zd„Zd„Zd„Zd„Z	d„Z
d„Zd „Zd!„Z
dddd"d#„Zdddd"d$„Zddd"d%„Zddddd"d&„Zddddd"d'„Zddddd(d(d)„Zdddgd*„Zddd"d+„ZRS(5Nsprepare 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, ...) takensdump-sources=dump generated source files before attempting to compile themcCsLd|_d|_d|_d|_d|_d|_d|_g|_	dS(Ni(
tNonetselftcompilertcctinclude_dirst	librariestlibrary_dirsRtdump_sourcet
temp_files(R
((t0/usr/lib64/python2.4/distutils/command/config.pytinitialize_options8s							cCsû|idjo|iipg|_n6t|iƒtjoti|iti	ƒ|_n|i
djo
g|_
n*t|i
ƒtjo|i
g|_
n|idjo
g|_n6t|iƒtjoti|iti	ƒ|_ndS(N(R
R
R	tdistributionttypet
StringTypetstringtsplittostpathsepRR(R
((Rtfinalize_optionsIs

cCsdS(N((R
((RtrunZscCsÂdkl}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.
        (s	CCompilersnew_compilerRtdry_runtforceiN(tdistutils.ccompilert	CCompilertnew_compilert
isinstanceR
RRtcustomize_compilerR
tset_include_dirsRt
set_librariesRtset_library_dirs(R
R R!((Rt_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_EXTtlangtfilenametopentfiletheaderstheadertwritetbodytclose(R
R2R/R+R0R,R.((Rt_gen_temp_sourcefileus

cCsT|i|||ƒ}d}|ii||gƒ|i	i
||d|ƒ||fS(Ns
_configtest.iR
(R
R4R2R/R+tsrctoutRtextendRt
preprocessR
(R
R2R/R
R+R5R6((Rt_preprocess‚s
cCs…|i|||ƒ}|iot|d|ƒn|ii	|gƒ\}|ii||gƒ|ii
|gd|ƒ||fS(Nscompiling '%s':R
(R
R4R2R/R+R5Rt	dump_fileRtobject_filenamestobjRR7tcompileR
(R
R2R/R
R+R5R<((Rt_compile‰s
c
	Cs¬|i||||ƒ\}}ti	i
ti	i|ƒƒd}	|i
i|g|	d|d|d|ƒ|i
idj	o|	|i
i}	n|ii|	ƒ|||	fS(NiRRttarget_lang(R
R>R2R/R
R+R5R<RtpathtsplitexttbasenametprogRtlink_executableRRt
exe_extensionR	Rtappend(
R
R2R/R
RRR+R<R5RC((Rt_link’s"
cGsr|p|i}g|_ntidti|ƒƒx5|D]-}yti	|ƒWq=t
j
oq=Xq=WdS(Nsremoving: %s(t	filenamesR
RtlogtinfoRtjoinR,RtremovetOSError(R
RHR,((Rt_clean¢s	
RcCsadkl}|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.)
        (sCompileErroriiN(RtCompileErrorR
R'tokR9R2R/R
R+RN(R
R2R/R
R+RPRO((Rttry_cpp¸s


cCs¹|iƒ|i||||ƒ\}}	t	|ƒtjoti
|ƒ}nt|	ƒ}d}
x>|iƒ}|djoPn|i|ƒod}
PqcqcW|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.
        iitN(R
R'R9R2R/R
R+R5R6RtpatternRtreR=R-R.tmatchtreadlinetlinetsearchR3RN(R
RSR2R/R
R+R5R.RWR6RU((Rt
search_cppÊs$




cCs|dkl}|iƒy |i||||ƒd}Wn|j
o
d}nXt
i|odpdƒ|iƒ|S(swTry to compile a source file built from 'body' and 'headers'.
        Return true on success, false otherwise.
        (sCompileErroriissuccess!sfailure.N(
RROR
R'R>R2R/R
R+RPRIRJRN(R
R2R/R
R+RPRO((Rttry_compileès



c
CsŽdkl}	l}|iƒy&|i||||||ƒd}Wn|	|fj
o
d}nXt
i|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.
        (sCompileErrors	LinkErroriissuccess!sfailure.N(RROt	LinkErrorR
R'RGR2R/R
RRR+RPRIRJRN(
R
R2R/R
RRR+RPR[RO((Rttry_linkøs



c
Cs¬dkl}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.
        (sCompileErrors	LinkErroriissuccess!sfailure.N(RROR[R
R'RGR2R/R
RRR+R5R<texetspawnRPtDistutilsExecErrorRIRJRN(
R
R2R/R
RRR+R]R<R5R[RORP((Rttry_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
N(R
R'R2tdeclRFtfunctcallRRKR\R/R
RR(	R
RcR/R
RRRbRdR2((Rt
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) { }N(R
R'R\R/R
tlibrarytother_librariesR(R
RfRR/R
Rg((Rt	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.
        R2s
/* No body */R/R
N(R
RQR0R
(R
R0R
RR+((Rtcheck_header[s(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=Rs!C preprocessor macros to undefine(s
libraries=Rs!external C libraries to link with(s
library-dirs=Rs.directories to search for external C libraries(snoisyNs1show every action (compile, link, run, ...) taken(sdump-sourceNs=dump generated source files before attempting to compile them(t__name__t
__module__tdescriptionR	tuser_optionsRRRR'R4R9R>RGRNRQRYRZR\R`ReRhRi(((RRs&!					
					$cCsO|djo
|dGHn|GHt|ƒ}tii|iƒƒ|i	ƒdS(Nt:(
theadR	R,R-R.tsyststdoutR1treadR3(R,RoR.((RR:hs

(t__doc__t__revision__RpRRRTttypestdistutils.coretCommandtdistutils.errorsR_tdistutils.sysconfigR#t	distutilsRIR*RR	R:(R#RtR_RRRpRTRwR*RR:RI((Rt?
s$



ÿO

Anon7 - 2021