config root man

Current Path : /usr/local/lib/python2.5/distutils/command/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/local/lib/python2.5/distutils/command/config.pyc

łň
h”Rc
@sÄdZdZddkZddkZddkZddkZddkTddklZddk	l
Z
ddklZddk
lZhd	d
<dd<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 $i˙˙˙˙N(t*(tCommand(tDistutilsExecError(tcustomize_compiler(tlogs.ctcs.cxxsc++tconfigcBs.eZdZd,d-d.d/d0d1d2d3d4g	Zd„Zd„Zd„Zd„Zd„Z	d„Z
d„Zd„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, ...) takensdump-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tdump_sourcet
temp_files(tself((s4/usr/local/lib/python2.5/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((s4/usr/local/lib/python2.5/distutils/command/config.pytfinalize_optionsIs

cCsdS(N((R((s4/usr/local/lib/python2.5/distutils/command/config.pytrunZscCsĹddkl}l}t|i|ƒp˜|d|id|iddƒ|_t|iƒ|io|ii|iƒn|i	o|ii
|i	ƒn|io|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!((s4/usr/local/lib/python2.5/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((s4/usr/local/lib/python2.5/distutils/command/config.pyt_gen_temp_sourcefileus

cCsT|i|||ƒ}d}|ii||gƒ|ii||d|ƒ||fS(Ns
_configtest.iR(R6RtextendRt
preprocess(RR0R1RR2tsrctout((s4/usr/local/lib/python2.5/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((s4/usr/local/lib/python2.5/distutils/command/config.pyt_compile‰s
c
	CsŹ|i||||ƒ\}}tiitii|ƒƒd}	|ii|g|	d|d|d|ƒ|iidj	o|	|ii}	n|i	i
|	ƒ|||	fS(NiRRttarget_lang(R@RtpathtsplitexttbasenameRtlink_executablet
exe_extensionR
Rtappend(
RR0R1RRRR2R9R?tprog((s4/usr/local/lib/python2.5/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((s4/usr/local/lib/python2.5/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((s4/usr/local/lib/python2.5/distutils/command/config.pyttry_cpp¸s

cCsˇ|iƒ|i||||ƒ\}}t|ƒtjoti|ƒ}nt|ƒ}d}	x<|iƒ}
|
djoPn|i|
ƒod}	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((s4/usr/local/lib/python2.5/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((s4/usr/local/lib/python2.5/distutils/command/config.pyttry_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((s4/usr/local/lib/python2.5/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((s4/usr/local/lib/python2.5/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((s4/usr/local/lib/python2.5/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((s4/usr/local/lib/python2.5/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((s4/usr/local/lib/python2.5/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=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)R6R;R@RIRORRRZR[R]R`ReRhRi(((s4/usr/local/lib/python2.5/distutils/command/config.pyRsZ						
					!cCsO|djo
|dGHn|GHt|ƒ}tii|iƒƒ|iƒdS(Nt:(R
R-tsyststdoutR.treadR/(R3theadR4((s4/usr/local/lib/python2.5/distutils/command/config.pyR<hs

(t__doc__t__revision__RoRRRTttypestdistutils.coreRtdistutils.errorsRtdistutils.sysconfigRt	distutilsRR,RR
R<(((s4/usr/local/lib/python2.5/distutils/command/config.pys<module>
s0

˙O

Man Man