python (3.11.7)

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

e(RdZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZdZd	Zd
ZdZdadZd
ZddZdxaxaadZdZddZdZ				ddZdZ ddZ!		ddZ"GddZ#dS) zudistutils.util

Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
N)DistutilsPlatformError)newer)spawn)log)DistutilsByteCompileErrorctjdkrrdtjvrdSdtjvrdSdtjvrdStjSdtjvrtjdStjd	ksttd
stjStj\}}}}}|	dd}|	d
d}|	dd}|dddkr|d|S|dddkrQ|ddkrDd}dt|ddz
|ddfz}ddd}|d|tjzz
}n|dddkrddlm
}|S|dd d!krMd!}tjd"tj}||}|r|}nI|dd d#kr;ddl}	ddl}
|	|
j|||\}}}|d|d|S)$aReturn a string that identifies the current platform.  This is used mainly to
    distinguish platform-specific build directories and platform-specific built
    distributions.  Typically includes the OS name and version and the
    architecture (as supplied by 'os.uname()'), although the exact information
    included depends on the OS; eg. on Linux, the kernel version isn't
    particularly important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.

    ntamd64	win-amd64z(arm)	win-arm32z(arm64)z	win-arm64_PYTHON_HOST_PLATFORMposixuname/ _-Nlinuxsunosr5solarisz%d.%s32bit64bit)ilz.%saix)aix_platformcygwinz[\d.]+darwin)osnamesysversionlowerplatformenvironhasattrrreplaceintmaxsize_aix_supportrrecompileASCIImatchgroup_osx_supportdistutils.sysconfigget_platform_osx	sysconfigget_config_vars)osnamehostreleaser&machinebitnessrrel_remr4	distutilss           B/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/distutils/util.pyget_host_platformrBs(
w$ck''))));ck''))));))++++;|"*,,z122	w'W!5!5|13

-VT7GW\\^^
#
#C
,
,Fooc3''Gooc3''G
bqbzW"6677++	w		1:FWQZ1!4gabbk BBG#*wGGGuws{333G	u		------|~~	x		Y11LL!!	 ggiiG	x		00000000#/#@#@(1(;(K(K(M(M(.$B$B  ''22ctjdkrFdddd}|tjdp
t	St	S)Nr	win32rr)x86x64armVSCMD_ARG_TGT_ARCH)r#r$getr)rB)TARGET_TO_PLATs rAget_platformrLcs_	w$


!!"*..1E"F"FGG^K\K^K^^ """rCcLtjdkr|S|s|S|ddkrtd|z|ddkrtd|z|d}d|vr|dd|v|stjStjj|S)aReturn 'pathname' as a name that will work on the native filesystem,
    i.e. split it on '/' and put it back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    rrzpath '%s' cannot be absolutezpath '%s' cannot end with '/'.)r#sep
ValueErrorsplitremovecurdirpathjoin)pathnamepathss  rAconvert_pathrYns
v}}{c7(BCCC|s88CDDDNN3E

,,
S,,y
7<rCctjdkrgtj|s tj||Stj||ddStjdkrXtj|\}}|ddkr
|dd}tj||St
dtjz)a	Return 'pathname' with 'new_root' prepended.  If 'pathname' is
    relative, this is equivalent to "os.path.join(new_root,pathname)".
    Otherwise, it requires making 'pathname' relative and then joining the
    two, which is tricky on DOS/Windows and Mac OS.
    rNr	r\z!nothing known about platform '%s')r#r$rUisabsrV
splitdriver)new_rootrWdriverUs    rAchange_rootras
w'w}}X&&	87<<(3337<<(122,777	D**844
7d??8Dw||Hd+++%%H27%RSSSrCcVtrdStjdkrddtjvrV	ddl}|tjdtjd<n#ttf$rYnwxYwdtjvrttjd<dadS)aLEnsure that 'os.environ' has all the environment variables we
    guarantee that users can use in config files, command-line options,
    etc.  Currently this includes:
      HOME - user's home directory (Unix only)
      PLAT - description of the current platform, including hardware
             and OS (see 'get_platform()')
    NrHOMErrPLATr[)
_environ_checkedr#r$r)pwdgetpwuidgetuidImportErrorKeyErrorrL)rfs rA
check_environrks	w'fBJ66	JJJ!$bikk!:!:1!=BJvX&			
D	
RZ)^^
6s=A''A;:A;ct|fd}	tjd||S#t$r}t	d|zd}~wwxYw)aPerform shell/Perl-style variable substitution on 'string'.  Every
    occurrence of '$' followed by a name is considered a variable, and
    variable is substituted by the value found in the 'local_vars'
    dictionary, or in 'os.environ' if it's not in 'local_vars'.
    'os.environ' is first checked/augmented to guarantee that it contains
    certain values: see 'check_environ()'.  Raise ValueError for any
    variables not found in either 'local_vars' or 'os.environ'.
    c|d}||vrt||Stj|S)Nr[)r3strr#r))r2
local_varsvar_names   rA_substzsubst_vars.<locals>._substs<;;q>>z!!z(+,,,:h''rCz\$([a-zA-Z_][a-zA-Z_0-9]*)zinvalid variable '$%s'N)rkr/subrjrQ)srorqvars    rA
subst_varsrusqOOO",((((9v3VQ???9991C78889s+
AAAerror: c&|t|zSN)rn)excprefixs  rAgrok_environment_errorr{sCHHrCctjdtjzatjdatjdadS)Nz
[^\\\'\"%s ]*z'(?:[^'\\]|\\.)*'z"(?:[^"\\]|\\.)*")r/r0string
whitespace
_wordchars_re
_squote_re
_dquote_rerCrA_init_regexrs>J/&2CCDDM011J011JJJrCc"tt|}g}d}|rt||}|}|t|kr||d|n}||tjvr=||d|||d	}d}n||dkr|d|||dzdz}|dz}n||dkrt||}n@||dkrt||}ntd||z|td||z|\}}|d|||dz|dz
z||dz}|d	z
}|t|kr||n||S)
aSplit a string up according to Unix shell-like rules for quotes and
    backslashes.  In short: words are delimited by spaces, as long as those
    spaces are not escaped by a backslash, or inside a quoted string.
    Single and double quotes are equivalent, and the quote characters can
    be backslash-escaped.  The backslash is stripped from any two-character
    escape sequence, leaving only the escaped character.  The quote
    characters are stripped from any quoted string.  Returns a list of
    words.
    Nrr\r['"z!this can't happen (bad char '%c')z"bad string (mismatched %s quotes?)r)rrstripr2endlenappendr}r~lstriprrRuntimeErrorrQspan)rswordsposr?rbegs      rAsplit_quotedrskmmm			AE
C
"3''eegg#a&&==LL4C4!!!S6V&&&LL4C4!!!#$$  ACC
sVt^^$3$!CEFF)#Aa%CCv}}$$Q,,33$$Q,,"#F3#OPPPy !E#!NOOOJS#$3$!CE#a%K.(1STT72A%%''A+C#a&&==LLOOOE"HLrCc|&|j|}|dddkr
|dddz}tj||s||dSdS)aPerform some action that affects the outside world (eg.  by
    writing to the filesystem).  Such actions are special because they
    are disabled by the 'dry_run' flag.  This method takes care of all
    that bureaucracy for you; all you have to do is supply the
    function to call and an argument tuple for it (to embody the
    "external action" being performed), and an optional message to
    print.
    Nz,)r))__name__rinfo)funcargsmsgverbosedry_runs     rAexecuter!sk{

tt,rss8tad)c/CHSMMMdrCcf|}|dvrdS|dvrdStd|)zConvert a string representation of truth to true (1) or false (0).

    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
    'val' is anything else.
    )yyesttrueon1r[)nnoffalseoff0rzinvalid truth value )r'rQ)vals rA	strtoboolr4sH))++C
222q	5	5	5qjSS:;;;rCr[cFddl}tjrtd||dk}|s	ddlm}	|	d\}
}n##t$rddlm}d|d}}
YnwxYwtj	d||s|
tj|
d	}
nt|d	}
|
5|

d
|

dtt |dz|

d
|d|d|d|d|ddddn#1swxYwYt"j}tjg}|||d|d||t/||t1tj|fd|z|dSddlm}|D]@}|dddkr|dkr,|dkrdn|}t8j||}nt8j|}|}|rG|dt?||krtAd|d||t?|d}|r tj!||}tj!"|}|rO|stG||r'tj	d|||s
||||*tj$d||BdS)a~Byte-compile a collection of Python source files to .pyc
    files in a __pycache__ subdirectory.  'py_files' is a list
    of files to compile; any files that don't end in ".py" are silently
    skipped.  'optimize' must be one of the following:
      0 - don't optimize
      1 - normal optimization (like "python -O")
      2 - extra optimization (like "python -OO")
    If 'force' is true, all files are recompiled regardless of
    timestamps.

    The source filename encoded in each bytecode file defaults to the
    filenames listed in 'py_files'; you can modify these with 'prefix' and
    'basedir'.  'prefix' is a string that will be stripped off of each
    source filename, and 'base_dir' is a directory name that will be
    prepended (after 'prefix' is stripped).  You can supply either or both
    (or neither) of 'prefix' and 'base_dir', as you wish.

    If 'dry_run' is true, doesn't actually do anything that would
    affect the filesystem.

    Byte-compilation is either done directly in this interpreter process
    with the standard py_compile module, or indirectly by writing a
    temporary script and executing it.  Normally, you should let
    'byte_compile()' figure out to use direct compilation or not (see
    the source for details).  The 'direct' flag is used by the script
    generated in indirect mode; unless you know what you're doing, leave
    it set to None.
    rNzbyte-compiling is disabled.T)mkstemp.py)mktempz$writing byte-compilation script '%s'wz2from distutils.util import byte_compile
files = [
z,
z]
z
byte_compile(files, optimize=z, force=z,
             prefix=z, base_dir=z,
             verbose=z$, dry_run=0,
             direct=1)
z	-Wignore:z:DeprecationWarning)rzremoving %s)r0r)optimizationzinvalid prefix: filename z doesn't start with zbyte-compiling %s to %sz%skipping byte-compilation of %s to %s)%
subprocessr%dont_write_bytecodertempfilerrirrrr#fdopenopenwriterVmapreprr@_DEPRECATION_MESSAGE
executableextend"_optim_args_from_interpreter_flagsrrrrS
py_compiler0	importlibutilcache_from_sourcerrQrUbasenamerdebug)py_filesoptimizeforcerzbase_dirrrdirectrr	script_fdscript_namerscriptrcmdr0fileoptcfiledfile
cfile_bases                      rAbyte_compilerDs"HG'(EFFF~ (A
Z0	;(((((('.wu~~$Y	;	;	;'''''''+VVE]]YYY	;	7EEE 	4$9c22k3//
4
4&UZZD((;(;<<uDEEE
xx'''3444+
4
4
4
4
4
4
4
4
4
4
4
4
4
4
48,~

:@@BBCCC

7s777888

;
c7####	K>=;+F	!	!	!	!	!	!	'&&&&& 	0 	0DBCCyE!!
1}}$MMbbx!88s9,,"88>>E
,V%//$*"ddFF&,---c&kkll+
6Xu55))%00J
00E$..0H6jIII"4eU333IE"J000? 	0 	0s$AA! A!%A9D**D.1D.cZ|d}d}||S)zReturn a version of the string escaped for inclusion in an
    RFC-822 header, by ensuring there are 8 spaces space after each newline.
    
z	
        )rRrV)headerlinesrPs   rA
rfc822_escapers*
LLE
C88E??rCc|sdSddlm}m}Gdd|}||d}|||}||d	dS)
aInvoke 2to3 on a list of Python files.
    The files should all come from the build area, as the
    modification is done in-place. To reduce the build time,
    only files modified since the last invocation of this
    function should be passed in the files argument.Nr)RefactoringToolget_fixers_from_packagec eZdZdZdZdZdS)*run_2to3.<locals>.DistutilsRefactoringToolc*tj|g|RdSrx)rerror)selfrrkws    rA	log_errorz4run_2to3.<locals>.DistutilsRefactoringTool.log_error Ic!D!!!!!!rCc*tj|g|RdSrx)rrrrrs   rAlog_messagez6run_2to3.<locals>.DistutilsRefactoringTool.log_messages HS 4      rCc*tj|g|RdSrx)rrrs   rA	log_debugz4run_2to3.<locals>.DistutilsRefactoringTool.log_debugrrCN)r
__module____qualname__rrrrrCrADistutilsRefactoringToolrsA	"	"	"	!	!	!	"	"	"	"	"rCrz
lib2to3.fixes)optionsT)r)lib2to3.refactorrrrefactor)filesfixer_namesrexplicitrrrrs        rArun_2to3rsJIIIIIII"""""?"""--o>>  g>>>AJJuDJ!!!!!rCc2ddlm}ddlm}ddlm}|}	t
j}
t
j|	|		t
j|
n#t
j|
wxYw|	j
|	jdd<|rC|D].}|
}|s|	|/g}|	jD]}
tj||
}|tj||tj||
|d}|dr||t'd|D|||	|S)
zRecursively copy a directory, only copying new and changed files,
    running run_2to3 over all newly copied Python modules afterward.

    If you give a template string, it's parsed like a MANIFEST.in.
    r)mkpath)	copy_file)FileListNr[)updatec`g|]+}|d)|,S)r)r'endswith).0fns  rA
<listcomp>z$copydir_run_2to3.<locals>.<listcomp>s3
@
@
@RRXXZZ%8%8%?%?
@b
@
@
@rC)rrr)distutils.dir_utilrdistutils.file_utilrdistutils.filelistrr#getcwdchdirfindallallfilesr
splitlinesrprocess_template_linerUrVdirnamerr)srcdesttemplaterrrrrrfilelistrTlinecopiedfilenameoutnameress                rAcopydir_run_2to3rs*)))))------++++++xzzH
Y[[FHSMMM
 )HN1111''))	1	1D::<<D!**40000
FN**',,tX..rww''(((iS(33WQGGGq6)6==)))
@
@6
@
@
@$gJJJJMsA..Bc$eZdZdZdZdZdZdZdS)	Mixin2to3zMixin class for commands that run 2to3.
    To configure 2to3, setup scripts may either change
    the class variables, or inherit from individual commands
    to override how 2to3 is invoked.NcDt||j|j|jSrx)rrrr)rrs  rArzMixin2to3.run_2to31st/t}MMMrC)rrr__doc__rrrrrrCrArr!sG((KGHNNNNNrCr)rv)Nrr)rrNNr[rN)NNN)NNNN)$rr#r/importlib.utilrr}r%r@distutils.errorsrdistutils.dep_utilrdistutils.spawnrrrrBrLrYrarerkrur{rrrrrrrrrrrrrrCrA<module>rs
							







333333$$$$$$!!!!!!666666N3N3N3`	#	#	#   8TTT,69992+/.
.
Z222888z&
<
<
<"%&(,%&	S0S0S0S0n""""6<@,0BNNNNNNNNNNrC