python (3.11.7)

(root)/
lib/
python3.11/
distutils/
command/
__pycache__/
build_py.cpython-311.pyc

e&CdZddlZddlZddlZddlZddlmZddlTddl	m
Z
mZddlm
Z
GddeZGd	d
eeZdS)zHdistutils.command.build_py

Implements the Distutils 'build_py' command.N)Command)*)convert_path	Mixin2to3)logceZdZdZgdZddgZddiZdZdZdZ	d	Z
d
ZdZdZ
d
ZdZdZdZdZdZdZddZdZdZdZdZdS)build_pyz5"build" pure Python modules (copy to build directory)))z
build-lib=dzdirectory to "build" (copy) to)compileczcompile .py to .pyc)
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)rrr
cvd|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	build_lib
py_modulespackagepackage_datapackage_dirroptimizerselfs N/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/distutils/command/build_py.pyinitialize_optionszbuild_py.initialize_options s@ 



cH|ddd|jj|_|jj|_|jj|_i|_|jjr;|jjD]\}}t||j|<||_	t|jtsV	t|j|_d|jcxkrdksnJdS#ttf$rtdwxYwdS)Nbuild)rr)rrrzoptimize must be 0, 1, or 2)set_undefined_optionsdistributionpackagesrrritemsrget_data_files
data_files
isinstancerint
ValueErrorAssertionErrorDistutilsOptionError)rnamepaths   rfinalize_optionszbuild_py.finalize_options*sL""7#=#5	7	7	7)2
+6 -:(	<"/;AACC
<
<
d)5d);); &&--//$---	J
J #DM 2 2
DM....Q......../
J
J
J*+HIII
J		J	Js
/C>>!Dc|jr||jr(||||ddSNr)include_bytecode)r
build_modulesr"build_packagesbuild_package_databyte_compileget_outputsrs rrunzbuild_py.runCsy,?	!   =	&!!!##%%%$**A*>>?????rc\g}|js|S|jD]}||}tjj|jg|dz}d|rt|dzfd|||D}|	||||f|S)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples.rc$g|]}|d
SN).0fileplens  r
<listcomp>z+build_py.get_data_files.<locals>.<listcomp>ss. $TUUr)
r"get_package_dirosr,joinrsplitlenfind_data_filesappend)rdatarsrc_dir	build_dir	filenamesr?s      @rr$zbuild_py.get_data_filesas}	K}	B	BG**733G'7'--:L:L'LNID
&7||A~(,(<(<Wg(N(NI
KK'9i@AAAArc	h|jdg|j|gz}g|D]t}tjtjtj|t|}fd|DuS)z6Return filenames for package's data files in 'src_dir'cZg|]'}|vtj|%|(Sr<)rBr,isfile)r=fnfiless  rr@z,build_py.find_data_files.<locals>.<listcomp>s;(((2U??GNN2&&4C"???r)	rgetglobrBr,rCescaperextend)rrrIglobspatternfilelistrQs      @rrFzbuild_py.find_data_filesys"&&r2..$(("556	)	)Gydk'.B.BLQXDYDY!Z!Z[[HLL((((x(((
)
)
)
)rcBd}|jD]\}}}}|D]}tj||}|tj||tj|||ddS)z$Copy data files into build directoryNF
preserve_mode)r%rBr,rCmkpathdirname	copy_file)rlastdirrrIrJrKfilenametargets        rr3zbuild_py.build_package_datas6:o	4	42GWi%
4
4i::BGOOF33444rw||GX>>-24444
4	4	4rc|d}|js|rtjj|SdSg}|r{	|jd|}|d|tjj|S#t$r"|d|d|d=YnwxYw|{|jd}||d||rtjj|SdS)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).r8rMr)rDrrBr,rCinsertKeyErrorrR)rrr,tailpdirs     rrAzbuild_py.get_package_dirs"}}S!!	
w|T**rD
/+CHHTNN;D
KK4(((7<.. !!!KK48,,,R!
"'++B//#KK4(((7<..2s B)B.-B.c|dkrbtj|std|ztj|std|z|rVtj|d}tj|r|Stjd|dS)NrMz%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))	rBr,existsDistutilsFileErrorisdirrCrOrwarn)rrrinit_pys    r
check_packagezbuild_py.check_packages
"7>>+..
M(=KMMM7==--
?(02=>???
	?gll;
>>Gw~~g&&
?46=???
trcttj|stjd||dSdS)Nz!file %s (for module %s) not foundFT)rBr,rOrrl)rmodulemodule_files   rcheck_modulezbuild_py.check_modules7w~~k**	H8+vNNN54rcJ|||tjtjtj|d}g}tj|jj}|D]}tj|}||kr[tj	tj
|d}||||f|d|z|S)Nz*.pyrzexcluding %s)
rnrSrBr,rCrTabspathr!script_namesplitextbasenamerGdebug_print)	rrrmodule_filesmodulessetup_scriptrabs_frps	         rfind_package_moduleszbuild_py.find_package_moduless7K000ydk+.F.F!O!OPPwt'8'DEE	@	@AGOOA&&E$$))"'*:*:1*=*=>>qA34444  ,!>????rci}g}|jD]}|d}d|dd}|d}	||\}}n'#t$r||}d}YnwxYw|s7|||}	|df||<|	r||d|	ftj||dz}
|	||
s||||
f|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.
        r8rrcr9__init__.py)
rrDrCrerArnrGrBr,rr)rr"rzrpr,rmodule_basercheckedrmrqs           rfind_moduleszbuild_py.find_modulessNo	@	@F<<$$DhhtAbDz**Gr(K
)1'):&gg


"227;;

C,,WkBB%0!$4!CNNGZ#ABBB
',,{K%4GHHK$$V[99
NNG[+>????s	A!A98A9cg}|jr'|||jrJ|jD]B}||}|||}||C|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.)rrUrr"rAr})rrzrrms     rfind_all_moduleszbuild_py.find_all_moduless?	0NN4,,..///=	"=
"
""227;;--g{CCq!!!!rc>d|DS)Ncg|]
}|dS)rcr<)r=rps  rr@z-build_py.get_source_files.<locals>.<listcomp>-sAAAvr
AAAr)rrs rget_source_fileszbuild_py.get_source_files,s"AA)>)>)@)@AAAArc\|gt|z|dzgz}tjj|S)Nr)listrBr,rC)rrJrrpoutfile_paths     rget_module_outfilezbuild_py.get_module_outfile/s/!{T']]2fun5EEw|\**rr9c|}g}|D]\}}}|d}||j||}|||r|jr4|tj|d|j	dkr9|tj||j	|d|j
Dz
}|S)Nr8rM)optimizationrcbg|],\}}}}|D]"}tj||#-Sr<)rBr,rC)r=rrIrJrKr`s      rr@z(build_py.get_outputs.<locals>.<listcomp>BsW6)Y%
GLLH--r)rrDrrrGr	importlibutilcache_from_sourcerr%)rr0rzoutputsrrprqr`s        rr5zbuild_py.get_outputs3s''')).5
	?
	?*WfkmmC((G..t~wOOHNN8$$$
?<4NN9>#C#C r$D$3$3444=1$$NN9>#C#C t}$D$>$>???	:>/	rc~t|tr|d}n+t|ttfstd||j||}tj	
|}|||||dS)Nr8z:'package' must be a string (dot-separated), list, or tuplerrZ)
r&strrDrtuple	TypeErrorrrrBr,r]r\r^)rrprqroutfiledirs      rbuild_modulezbuild_py.build_moduleJsgs##	PmmC((GGGdE]33	PNPP
P))$.'6JJgoog&&C~~k7!~DDDrcn|}|D]\}}}||||dSr;)rr)rrzrrprqs     rr1zbuild_py.build_modulesYsP##%%.5	<	<*Wfk

fk7;;;;	<	<rc|jD]U}||}|||}|D]%\}}}||ksJ||||&VdSr;)r"rAr}r)rrrrzpackage_rprqs       rr2zbuild_py.build_packagesbs}	@	@G..w77K//EEG4;
@
@/6;(****!!&+w????
@	@	@rcJtjr|ddSddlm}|j}|dtjkr|tjz}|jr||d|j	||j
|jdkr!|||j|j	||j
dSdS)Nz%byte-compiling is disabled, skipping.r)r4rc)rrprefixdry_run)sysdont_write_bytecoderldistutils.utilr4rrBseprrrr)rrQr4rs    rr4zbuild_py.byte_compilevs"	II=>>>F//////":bf_F
<	PL#z&$,
P
P
P
P=1L#z&$,
P
P
P
P
P
PrN)r9)__name__
__module____qualname__descriptionuser_optionsboolean_optionsnegative_optrr-r6r$rFr3rArnrrr}rrrrr5rr1r2r4r<rrr	r	sxKK


L!'*O 9-LJJJ2@@@<0444%%%N6


222h BBB+++.
E
E
E<<<@@@(PPPPPrr	ceZdZdZdZdS)
build_py_2to3c.g|_|jr||jr(||||j||ddSr/)	
updated_filesrr1r"r2r3run_2to3r4r5rs rr6zbuild_py_2to3.runs?	!   =	&!!!##%%%	


d()))	
$**A*>>?????rct||||}|dr |j|d|S)Nr9r)r	rrrG)rrprqrress     rrzbuild_py_2to3.build_modulesG##D&+wGGq6	.%%c!f---
rN)rrrr6rr<rrrrs5@@@ rr)__doc__rBimportlib.utilrrrSdistutils.corerdistutils.errorsrrr	distutilsrr	rr<rr<module>rs00
			



""""""22222222yPyPyPyPyPyPyPyPvHir