• File: config.cpython-37.opt-2.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib64/python3.7/distutils/command/__pycache__/config.cpython-37.opt-2.pyc
  • Date Modified: 10/26/2026 8:08 PM
  • File size: 6.72 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

YI~d3@shddlZddlZddlmZddlmZddlmZddlm	Z	dddZ
Gd	d
d
eZd
ddZdS)N)Command)DistutilsExecError)customize_compiler)logz.cz.cxx)czc++c	@seZdZdZdddddddd	d
g	ZddZd
dZddZddZddZ	ddZ
ddZddZddZ
d0dd Zd1d!d"Zd2d#d$Zd3d%d&Zd4d'd(Zd5d*d+Zdddgfd,d-Zd6d.d/ZdS)7configzprepare to build)z	compiler=Nzspecify the compiler type)zcc=Nzspecify the compiler executable)z
include-dirs=Iz.list of directories to search for header files)zdefine=DzC preprocessor macros to define)zundef=Uz!C preprocessor macros to undefine)z
libraries=lz!external C libraries to link with)z
library-dirs=Lz.directories to search for external C libraries)noisyNz1show every action (compile, link, run, ...) taken)zdump-sourceNz=dump generated source files before attempting to compile themcCs4d|_d|_d|_d|_d|_d|_d|_g|_dS)N)compilerZccinclude_dirs	librarieslibrary_dirsr
dump_source
temp_files)selfr=/opt/alt/python37/lib64/python3.7/distutils/command/config.pyinitialize_options3szconfig.initialize_optionscCs|jdkr|jjpg|_nt|jtr6|jtj|_|jdkrHg|_nt|jtr^|jg|_|jdkrpg|_nt|jtr|jtj|_dS)N)	rZdistribution
isinstancestrsplitospathseprr)rrrrfinalize_optionsBs



zconfig.finalize_optionscCsdS)Nr)rrrrrunRsz
config.runcCszddlm}m}t|j|sv||j|jdd|_t|j|jrN|j|j|j	rb|j
|j	|jrv|j|jdS)Nr)	CCompilernew_compilerr)rdry_runforce)
distutils.ccompilerr r!rrr"rrZset_include_dirsrZ
set_librariesrZset_library_dirs)rr r!rrr_check_compilerYs
zconfig._check_compilercCsldt|}t|d}|r@x|D]}|d|q W|d|||ddkr`|d||S)NZ_configtestwz#include <%s>

)LANG_EXTopenwriteclose)rbodyheaderslangfilenamefileheaderrrr_gen_temp_sourcefileks




zconfig._gen_temp_sourcefilecCs<||||}d}|j||g|jj|||d||fS)Nz
_configtest.i)r)r3rextendrZ
preprocess)rr-r.rr/srcoutrrr_preprocessxs
zconfig._preprocesscCs\||||}|jr"t|d||j|g\}|j||g|jj|g|d||fS)Nzcompiling '%s':)r)r3r	dump_filerZobject_filenamesrr4compile)rr-r.rr/r5objrrr_compileszconfig._compilec
Csr|||||\}}tjtj|d}	|jj|g|	|||d|jjdk	r\|	|jj}	|j	|	|||	fS)Nr)rrZtarget_lang)
r;rpathsplitextbasenamerZlink_executableZ
exe_extensionrappend)
rr-r.rrrr/r5r:progrrr_linkszconfig._linkc	GsX|s|j}g|_tdd|x0|D](}yt|Wq(tk
rNYq(Xq(WdS)Nzremoving: %s )rrinfojoinrremoveOSError)r	filenamesr0rrr_cleans
z
config._cleanNrcCsRddlm}|d}y|||||Wn|k
rDd}YnX||S)Nr)CompileErrorTF)r$rIr%r7rH)rr-r.rr/rIokrrrtry_cpps
zconfig.try_cppcCsx||||||\}}t|tr0t|}t|}d}	x&|}
|
dkrPP||
r>d}	Pq>W|	|
|	S)NFT)r%r7rrrer9r*readlinesearchr,rH)rpatternr-r.rr/r5r6r1matchlinerrr
search_cpps 	


zconfig.search_cppcCsdddlm}|y|||||d}Wn|k
rDd}YnXt|rRdpTd||S)Nr)rITFzsuccess!zfailure.)r$rIr%r;rrCrH)rr-r.rr/rIrJrrrtry_compiles
zconfig.try_compilec
	Cspddlm}m}|y|||||||d}	Wn||fk
rPd}	YnXt|	r^dp`d||	S)Nr)rI	LinkErrorTFzsuccess!zfailure.)r$rIrUr%rArrCrH)
rr-r.rrrr/rIrUrJrrrtry_links


zconfig.try_linkc

Csddlm}m}|y.|||||||\}	}
}||gd}Wn||tfk
rdd}YnXt|rrdptd|	|S)Nr)rIrUTFzsuccess!zfailure.)
r$rIrUr%rAZspawnrrrCrH)
rr-r.rrrr/rIrUr5r:ZexerJrrrtry_runs

zconfig.try_runrc	Cst|g}|r|d||d|r<|d|n|d||dd|d}||||||S)Nz
int %s ();z
int main () {z  %s();z  %s;}r')r%r?rDrV)	rfuncr.rrrZdeclZcallr-rrr
check_funcs


zconfig.check_funccCs ||d|||g||S)Nzint main (void) { })r%rV)rZlibraryrr.rZother_librariesrrr	check_lib6s

zconfig.check_libcCs|jd|g|dS)Nz
/* No body */)r-r.r)rK)rr2rrr/rrrcheck_headerDs
zconfig.check_header)NNNr)NNNr)NNr)NNNNr)NNNNr)NNNNrr)NNr)__name__
__module____qualname__descriptionZuser_optionsrrrr%r3r7r;rArHrKrSrTrVrWrZr[r\rrrrrsB
	






rcCsJ|dkrtd|n
t|t|}zt|Wd|XdS)Nz%s)rrCr*readr,)r0headr1rrrr8Ns
r8)N)
rrMZdistutils.corerZdistutils.errorsrZdistutils.sysconfigrZ	distutilsrr)rr8rrrr<module>s
;