MINI MINI MANI MO

Path : /lib64/python3.6/distutils/command/__pycache__/
File Upload :
Current File : //lib64/python3.6/distutils/command/__pycache__/config.cpython-36.opt-2.pyc

3


 \3@shddlZddlZddlmZddlmZddlmZddlm	Z	dddZ
Gd	d
d
eZd
ddZdS)N)Command)DistutilsExecError)customize_compiler)logz.cz.cxx)czc++c@seZdZdZd>d?d@dAdBdCdDdEdFg	ZddZddZddZd d!Zd"d#Z	d$d%Z
d&d'Zd(d)Zd*d+Z
dGd-d.ZdHd/d0ZdId1d2ZdJd3d4ZdKd5d6ZdLd8d9Zdddgfd:d;ZdMd<d=ZdS)Nconfigzprepare to build	compiler=Nspecify the compiler typecc=specify the compiler executable
include-dirs=I.list of directories to search for header filesdefine=DC preprocessor macros to defineundef=U!C preprocessor macros to undefine
libraries=l!external C libraries to link with
library-dirs=L.directories to search for external C librariesnoisy1show every action (compile, link, run, ...) takendump-source=dump generated source files before attempting to compile themcCs4d|_d|_d|_d|_d|_d|_d|_g|_dS)N)compilerZccinclude_dirs	librarieslibrary_dirsrdump_source
temp_files)selfr'0/usr/lib64/python3.6/distutils/command/config.pyinitialize_options3szconfig.initialize_optionscCs|jdkr|jjpg|_nt|jtr6|jjtj|_|jdkrHg|_nt|jtr^|jg|_|jdkrpg|_nt|jtr|jjtj|_dS)N)	r!Zdistribution
isinstancestrsplitospathsepr"r#)r&r'r'r(finalize_optionsBs



zconfig.finalize_optionscCsdS)Nr')r&r'r'r(runRsz
config.runcCszddlm}m}t|j|sv||j|jdd|_t|j|jrN|jj|j|j	rb|jj
|j	|jrv|jj|jdS)Nr)	CCompilernew_compilerr)r dry_runZforce)
distutils.ccompilerr1r2r*r r3rr!Zset_include_dirsr"Z
set_librariesr#Zset_library_dirs)r&r1r2r'r'r(_check_compilerYs
zconfig._check_compilercCsldt|}t|d}|r@x|D]}|jd|q W|jd|j||ddkr`|jd|j|S)NZ_configtestwz#include <%s>

r)LANG_EXTopenwriteclose)r&bodyheaderslangfilenamefileheaderr'r'r(_gen_temp_sourcefileks




zconfig._gen_temp_sourcefilecCs<|j|||}d}|jj||g|jj|||d||fS)Nz
_configtest.i)r!)rCr%extendr Z
preprocess)r&r=r>r!r?srcoutr'r'r(_preprocessxs
zconfig._preprocesscCs\|j|||}|jr"t|d||jj|g\}|jj||g|jj|g|d||fS)Nzcompiling '%s':)r!)rCr$	dump_filer Zobject_filenamesr%rDcompile)r&r=r>r!r?rEobjr'r'r(_compileszconfig._compilec
Csr|j||||\}}tjjtjj|d}	|jj|g|	|||d|jjdk	r\|	|jj}	|jj	|	|||	fS)Nr)r"r#Ztarget_lang)
rKr-pathsplitextbasenamer Zlink_executableZ
exe_extensionr%append)
r&r=r>r!r"r#r?rErJprogr'r'r(_linkszconfig._linkcGsX|s|j}g|_tjddj|x0|D](}ytj|Wq(tk
rNYq(Xq(WdS)Nzremoving: %s )r%rinfojoinr-removeOSError)r&	filenamesr@r'r'r(_cleans
z
config._cleanrcCsRddlm}|jd}y|j||||Wn|k
rDd}YnX|j|S)Nr)CompileErrorTF)r4rYr5rGrX)r&r=r>r!r?rYokr'r'r(try_cpps
zconfig.try_cppcCsx|j|j||||\}}t|tr0tj|}t|}d}	x&|j}
|
dkrPP|j|
r>d}	Pq>W|j	|j
|	S)NFT)r5rGr*r+rerIr:readlinesearchr<rX)r&patternr=r>r!r?rErFrAmatchliner'r'r(
search_cpps 	


zconfig.search_cppcCsdddlm}|jy|j||||d}Wn|k
rDd}YnXtj|rRdpTd|j|S)Nr)rYTFzsuccess!zfailure.)r4rYr5rKrrSrX)r&r=r>r!r?rYrZr'r'r(try_compiles
zconfig.try_compilec

Cspddlm}m}|jy|j||||||d}	Wn||fk
rPd}	YnXtj|	r^dp`d|j|	S)Nr)rY	LinkErrorTFzsuccess!zfailure.)r4rYrer5rQrrSrX)
r&r=r>r!r"r#r?rYrerZr'r'r(try_links


zconfig.try_linkc

Csddlm}m}|jy.|j||||||\}	}
}|j|gd}Wn||tfk
rdd}YnXtj|rrdptd|j	|S)Nr)rYreTFzsuccess!zfailure.)
r4rYrer5rQZspawnrrrSrX)
r&r=r>r!r"r#r?rYrerErJZexerZr'r'r(try_runs

zconfig.try_runrc	Cst|jg}|r|jd||jd|r<|jd|n|jd||jddj|d}|j|||||S)Nz
int %s ();z
int main () {z  %s();z  %s;}r7)r5rOrTrf)	r&funcr>r!r"r#ZdeclZcallr=r'r'r(
check_funcs


zconfig.check_funccCs |j|jd|||g||S)Nzint main (void) { })r5rf)r&Zlibraryr#r>r!Zother_librariesr'r'r(	check_lib6s

zconfig.check_libcCs|jd|g|dS)Nz
/* No body */)r=r>r!)r[)r&rBr!r#r?r'r'r(check_headerDs
zconfig.check_header)rNr	)r
Nr)rr
r)rrr)rrr)rrr)rrr)rNr)rNr)NNNr)NNNr)NNr)NNNNr)NNNNr)NNNNrr)NNr)__name__
__module____qualname__ZdescriptionZuser_optionsr)r/r0r5rCrGrKrQrXr[rcrdrfrgrjrkrlr'r'r'r(rsT
	






rc
CsJ|dkrtjd|n
tj|t|}ztj|jWd|jXdS)Nz%s)rrSr:readr<)r@headrAr'r'r(rHNs
rH)N)
r-r]Zdistutils.corerZdistutils.errorsrZdistutils.sysconfigrZ	distutilsrr9rrHr'r'r'r(<module>s
;

OHA YOOOO