File "build_py.cpython-37.opt-1.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python37/lib64/python3.7/distutils/command/__pycache__/build_py.cpython-37.opt-1.pyc
File size: 10.09 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit

B

 fC@s~dZddlZddlZddlZddlmZddlmZddlTddl	m
Z
mZddlm
Z
Gdd	d	eZGd
ddeeZdS)zHdistutils.command.build_py

Implements the Distutils 'build_py' command.N)glob)Command)*)convert_path	Mixin2to3)logc@seZdZdZdddddgZddgZd	diZd
dZdd
ZddZ	ddZ
ddZddZddZ
ddZddZddZddZd d!Zd"d#Zd$d%Zd2d'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1S)3build_pyz5"build" pure Python modules (copy to build directory))z
build-lib=dzdirectory to "build" (copy) to)compileczcompile .py to .pyc)z
no-compileNz!don't compile .py files [default])z	optimize=Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])forcefz2forcibly build everything (ignore file timestamps)r
r
z
no-compilecCs4d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	build_lib
py_modulespackagepackage_datapackage_dirr
optimizer
)selfr?/opt/alt/python37/lib64/python3.7/distutils/command/build_py.pyinitialize_options szbuild_py.initialize_optionsc	Cs|ddd|jj|_|jj|_|jj|_i|_|jjrbx&|jjD]\}}t||j|<qHW||_	t
|jtsyt|j|_Wn t
tfk
rtdYnXdS)NZbuild)rr)r
r
zoptimize must be 0, 1, or 2)Zset_undefined_optionsdistributionpackagesrrritemsrget_data_files
data_files
isinstancerint
ValueErrorAssertionErrorZDistutilsOptionError)rnamepathrrrfinalize_options*s"



zbuild_py.finalize_optionscCs:|jr||jr$||||jdddS)Nr)include_bytecode)r
build_modulesrbuild_packagesbuild_package_databyte_compileget_outputs)rrrrrunCszbuild_py.runcsg}|js|Sxr|jD]h}||}tjj|jg|d}d|rRt|dfdd|||D}|	||||fqW|S)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples.rcsg|]}|dqS)Nr).0file)plenrr
<listcomp>tsz+build_py.get_data_files.<locals>.<listcomp>)
rget_package_dirosr#joinrsplitlenfind_data_filesappend)rdatarsrc_dir	build_dir	filenamesr)r0rras
zbuild_py.get_data_filescs`|jdg|j|g}gx:|D]2}ttj|t|}fdd|Dq&WS)z6Return filenames for package's data files in 'src_dir'cs$g|]}|krtj|r|qSr)r3r#isfile)r.fn)filesrrr1s
z,build_py.find_data_files.<locals>.<listcomp>)rgetrr3r#r4rextend)rrr:ZglobspatternZfilelistr)r@rr7ys
zbuild_py.find_data_filescCshd}x^|jD]T\}}}}xF|D]>}tj||}|tj||jtj|||ddqWqWdS)z$Copy data files into build directoryNF)
preserve_mode)rr3r#r4mkpathdirname	copy_file)rZlastdirrr:r;r<filenametargetrrrr(s
zbuild_py.build_package_datacCs|d}|js&|r tjj|SdSng}x|ry|jd|}Wn*tk
rn|d|d|d=Yq,X|d|tjj|Sq,W|jd}|dk	r|d||rtjj|SdSdS)zReturn the directory, relative to the top of the source
           distribution, where package 'package' should be found
           (at least according to the 'package_dir' option, if any).r,r=rN)r5rr3r#r4KeyErrorinsertrA)rrr#tailZpdirrrrr2s(
	zbuild_py.get_package_dircCsj|dkr8tj|s td|tj|s8td||rftj|d}tj|rZ|Std|dS)Nr=z%package directory '%s' does not existz>supposed package directory '%s' exists, but is not a directoryz__init__.pyz8package init file '%s' not found (or not a regular file))	r3r#existsZDistutilsFileErrorisdirr4r>rwarn)rrrinit_pyrrr
check_packages
zbuild_py.check_packagecCs&tj|std||dSdSdS)Nz!file %s (for module %s) not foundFT)r3r#r>rrP)rmodulemodule_filerrrcheck_moduleszbuild_py.check_modulec	Cs|||ttj|d}g}tj|jj}xX|D]P}tj|}||krztjtj	|d}|
|||fq8|d|q8W|S)Nz*.pyrzexcluding %s)rRrr3r#r4abspathrZscript_namesplitextbasenamer8Zdebug_print)	rrrZmodule_filesmodulesZsetup_scriptrZabs_frSrrrfind_package_moduless
zbuild_py.find_package_modulesc	Csi}g}x|jD]}|d}d|dd}|d}y||\}}Wn"tk
rj||}d}YnX|s|||}	|df||<|	r||d|	ftj||d}
|	||
sq||||
fqW|S)aFinds individually-specified Python modules, ie. those listed by
        module name in 'self.py_modules'.  Returns a list of tuples (package,
        module_base, filename): 'package' is a tuple of the path through
        package-space to the module; 'module_base' is the bare (no
        packages, no dots) module name, and 'filename' is the path to the
        ".py" file (relative to the distribution root) that implements the
        module.
        r,rrJr-__init__z.py)
rr5r4rKr2rRr8r3r#rU)rrrYrSr#rZmodule_basercheckedrQrTrrrfind_moduless*


zbuild_py.find_modulescCsRg}|jr|||jrNx.|jD]$}||}|||}||q&W|S)a4Compute the list of all modules that will be built, whether
        they are specified one-module-at-a-time ('self.py_modules') or
        by whole packages ('self.packages').  Return a list of tuples
        (package, module, module_file), just like 'find_modules()' and
        'find_package_modules()' do.)rrBr]rr2rZ)rrYrrmrrrfind_all_moduless
zbuild_py.find_all_modulescCsdd|DS)NcSsg|]}|dqS)rJr)r.rSrrrr1-sz-build_py.get_source_files.<locals>.<listcomp>)r_)rrrrget_source_files,szbuild_py.get_source_filescCs$|gt||dg}tjj|S)Nz.py)listr3r#r4)rr;rrSZoutfile_pathrrrget_module_outfile/szbuild_py.get_module_outfiler-cCs|}g}xx|D]p\}}}|d}||j||}|||r|jr`|tjj|dd|j	dkr|tjj||j	dqW|dd|j
D7}|S)Nr,r=)optimizationrcSs,g|]$\}}}}|D]}tj||qqSr)r3r#r4)r.rr:r;r<rHrrrr1Cs
z(build_py.get_outputs.<locals>.<listcomp>)r_r5rbrr8r
	importlibutilcache_from_sourcerr)rr%rYZoutputsrrSrTrHrrrr*3s"




zbuild_py.get_outputscCsbt|tr|d}nt|ttfs,td||j||}tj	
|}|||j||ddS)Nr,z:'package' must be a string (dot-separated), list, or tupler)rD)
rstrr5ratuple	TypeErrorrbrr3r#rFrErG)rrSrTrZoutfiledirrrrbuild_moduleJs

zbuild_py.build_modulecCs.|}x |D]\}}}||||qWdS)N)r]rk)rrYrrSrTrrrr&Yszbuild_py.build_modulescCsLxF|jD]<}||}|||}x |D]\}}}||||q(WqWdS)N)rr2rZrk)rrrrYZpackage_rSrTrrrr'bs


zbuild_py.build_packagescCstjr|ddSddlm}|j}|dtjkr>|tj}|jrZ||d|j	||j
d|jdkr||||j|j	||j
ddS)Nz%byte-compiling is disabled, skipping.r)r)rJ)rr
prefixdry_run)sysdont_write_bytecoderPdistutils.utilr)rr3sepr
r
rmr)rr@r)rlrrrr)vs


zbuild_py.byte_compileN)r-)__name__
__module____qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optrr$r+rr7r(r2rRrUrZr]r_r`rbr*rkr&r'r)rrrrrs6


'4
	rc@seZdZddZddZdS)
build_py_2to3cCsLg|_|jr||jr*||||j||jdddS)Nr)r%)	
updated_filesrr&rr'r(Zrun_2to3r)r*)rrrrr+szbuild_py_2to3.runcCs,t||||}|dr(|j|d|S)Nr-r)rrkrvr8)rrSrTrZresrrrrkszbuild_py_2to3.build_moduleN)rrrsrtr+rkrrrrrusru)__doc__r3importlib.utilrdrnrZdistutils.corerZdistutils.errorsrprrZ	distutilsrrrurrrr<module>s}