python (3.12.0)

(root)/
lib/
python3.12/
venv/
__pycache__/
__init__.cpython-312.opt-1.pyc

̑e*`*dZddlZddlZddlZddlZddlZddlZddlZdZeje
ZGddZ		ddZ
d
dZe
dk(rd	Z	edZej(eyy#e$r!Zed
ezej&YdZ[5dZ[wwxYw)z
Virtual environment (venv) package for Python. Based on PEP 405.

Copyright (C) 2011-2014 Vinay Sajip.
Licensed to the PSF under a contributor agreement.
N)pipceZdZdZ			ddZdZdZdZdZdZ	e
jd	k7rdd
ZnddZdZ
d
ZdZdZdZdZdZdZy)
EnvBuildera
    This class exists to allow virtual environment creation to be
    customized. The constructor parameters determine the builder's
    behaviour when called upon to create a virtual environment.

    By default, the builder makes the system (global) site-packages dir
    *un*available to the created environment.

    If invoked using the Python -m option, the default is to use copying
    on Windows platforms but symlinks elsewhere. If instantiated some
    other way, the default is to *not* use symlinks.

    :param system_site_packages: If True, the system (global) site-packages
                                 dir is available to created environments.
    :param clear: If True, delete the contents of the environment directory if
                  it already exists, before environment creation.
    :param symlinks: If True, attempt to symlink rather than copy files into
                     virtual environment.
    :param upgrade: If True, upgrade an existing virtual environment.
    :param with_pip: If True, ensure pip is installed in the virtual
                     environment
    :param prompt: Alternative terminal prefix for the environment.
    :param upgrade_deps: Update the base venv modules to the latest on PyPI
    Nc||_||_||_||_||_||_|dk(r1tjjt
j}||_
||_y)N.)system_site_packagesclearsymlinksupgradewith_piporig_promptospathbasenamegetcwdpromptupgrade_deps)selfrr	r
rrrrs        A/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/venv/__init__.py__init__zEnvBuilder.__init__.s`%9!
 
 
!S=WW%%biik2F(ctjj|}|j|}|j}d|_|j||j
||jr|j||js"|j||j||rd|_|j||jr|j|yy)z
        Create a virtual environment in a directory.

        :param env_dir: The target directory to create an environment in.

        FTN)rrabspathensure_directoriesrcreate_configurationsetup_pythonr
_setup_pipr
setup_scripts
post_setuprupgrade_dependencies)renv_dircontexttrue_system_site_packagess    rcreatezEnvBuilder.create<s''//'*))'2%)$=$=!$)!!!'*'"==OOG$||w'OOG$$)-D%%%g.%%g.rctj|D]}tjj||}tjj	|stjj|rtj|wtjj|stj|yN)
rlistdirrjoinislinkisfileremoveisdirshutilrmtree)rrfns   rclear_directoryzEnvBuilder.clear_directoryXst**T"	"BdB'Bww~~b!RWW^^B%7		"
r"

b!	"rc@||||d}tj|d|S)N)baseplatbaseinstalled_baseinstalled_platbasevenv)schemevars)	sysconfigget_path)rr!namer8s    r
_venv_pathzEnvBuilder._venv_path`s,%")	
!!$vDAArcd}tjtj|vr td|dtjdtjj|r|jr|j|tj}||_
tjj|d|_|j|jn|j}d|z|_
||tj}|stdtjjtjj!|\}}||_||_||_|j)|d}|j)|d	}	|j)|d
}
|	|_||	|
|_||
tj.dkDr{tj0dk(rhtj2d
k7rUtjj5|d}tjj|stj6d|||_tjj;|||_tjj5|||_|||j>|_ tj2dk(rtjjC|j>}tjjE|tjjE|j>k7r(tFjId|j>|||_ |S)z
        Create the directories for the environment.

        Returns a context object which holds paths in the environment,
        for use by subsequent logic.
        ctjj|stj|ytjj	|stjj|rt
d|zy)NzUnable to create directory %r)rrexistsmakedirsr)r*
ValueError)ds rcreate_if_neededz7EnvBuilder.ensure_directories.<locals>.create_if_neededqsR77>>!$A"bggnnQ&7 !@1!DEE'8rzRefusing to create a venv in z( because it contains the PATH separator rz(%s) zUnable to determine path to the running Python interpreter. Provide an explicit path or check that your PATH environment variable is correctly set.scriptsincludepureliblposixdarwinlib64libwin32zActual environment location may have moved due to redirects, links or junctions.
  Requested location: "%s"
  Actual location:    "%s")%rpathsepfspathrArr?r	r0typesSimpleNamespacer!splitenv_namersys_base_executabler
executable
python_dir
python_exer<inc_pathlib_pathmaxsizer;platformr(symlinkbin_pathrelpathbin_nameenv_exeenv_exec_cmdrealpathnormcaseloggerwarning)
rr!rCr"rrUdirnameexenamebinpathincpathlibpath	link_pathreal_env_exes
             rrzEnvBuilder.ensure_directoriesis	F::7++<WIF??Azzl!MN
N
77>>'"tzz  )'')!77==1!4 $ 7W=M=M 6)!))
./
/77==)DE'$$//'95//'95//'95"!"!
[[5
 rww''9
\\X
%Wg6I77>>),

5),"77??7G<'',,w8! '<<7"77++GOO<Lww-1A1A'//1RR < '	>
(4$rctjj|jdx|_}t|dd5}|j
d|jz|jrd}nd}|j
d|z|j
d	tjd
dz|j|j
d|jd
|j
dtjjtjzg}tjdk(}|r|jr|j!d|s|js|j!d|j"s|j!d|jr|j!d|j$r|j!d|j&r|j!d|j(r|j!d|j*|j!d|j*d|j!|jdj|}|j
dtjd|d
d
d
d
y
#1swYy
xYw)aA
        Create a configuration file indicating where the environment's Python
        was copied from, and whether the system site-packages should be made
        available in the environment.

        :param context: The information for the environment creation request
                        being processed.
        z
pyvenv.cfgwutf-8)encodingz
home = %s
truefalsez"include-system-site-packages = %s
zversion = %d.%d.%d
Nz	prompt = 
zexecutable = %s
nt
--symlinks--copies
--without-pip--system-site-packages--clear	--upgrade--upgrade-depsz
--prompt="" z
command = z	 -m venv )rrr(r!cfg_pathopenwriterVrrSversion_inforrbrUr;r
appendrr	rrr
)rr"rfinclargsrus       rrzEnvBuilder.create_configurations#%'',,w"MM4
$g
. 	D!
GGMG$6$667((
GG9D@A
GG*S-=-=bq-AAB{{&)DKK?"56
GG'"''*:*:3>>*JJKDDBdmmL)dmmJ'==O,((45zzI&||K(  ,-+j)9)9(:!<=KK(88D>D
GGj 0	$rBCA 	D 	D 	Ds
H4I==Jruc||j}|sl	tjj|sL|r4tjtjj||ntj|||rtj||yy#t$rtjd||d}Y>wxYw)Y
            Try symlinking a file, and if that fails, fall back to copying.
            Unable to symlink %r to %rTN)r
rrr)r\r	Exceptionrdrer-copyfile)rsrcdstrelative_symlinks_ok
force_copys     rsymlink_or_copyzEnvBuilder.symlink_or_copys"]]*J	&77>>#./JJrww'7'7'<cBJJsC0S)!&NN#?cJ!%J&sA+B"B;:B;ctjj|xr tjj|}|jro|smtjj|sN	|r4tjtjj||ytj||ytjjtjj|\}}tjjtjjtdd||z}tj stjj#|sk|j%dr
d|z}|dd}|dk(rd}n|d	k(rd
}tjjtjj|||z}n|}tjj|s|stjd|yt'j(||y#t$rtjd||YwxYw)rNrrEru_dpythonvenvlauncherpythonw
venvwlauncherzUnable to copy %r)rrlexistsr?r
r)r\rrrdresplitextr(rf__file__r9is_python_buildr*endswithr-r)rrrrbad_srcrextsrcfns        rrzEnvBuilder.symlink_or_copysggooc*F277>>#3F/FG}}WRWW^^C5HK+

277#3#3C#8#>

3,GG,,RWW-=-=c-BCMHcGGLL!:!*!%!)C1E((*"''..2G$$T**C'}Hx'-H*.Hggll277??3#7CH77>>#&NN#6<OOC%9!KNN#?cJKs05H1&H11 IIc|j}|j}|j}|j}tj
dk7r||j|tjj|st	j|ddddtjdfD]}tjj||}tjj|rC||j|dtjj|rxt	j|dy|jrt	j|Dcgc]E}tjj!tjj#|dd	vr|G}}t%j&r||Dcgc]2}tjj!|j)d
r|4}}n>hd}tjj+|j}	|j-|	|D]i}tjj||}
tjj/|
sC||
tjj||kt%j&rt	j0|jD]\}}}
d|
vstjj+|}tjj|j2d
|}tjj|st	j4|tjj|d}
tjj|d}t7j8|
|yyycc}wcc}w)z
        Set up a Python executable in the environment.

        :param context: The information for the environment creation request
                        being processed.
        ruirpython3zpython3.rDT)r).exez.dll)r	vcruntime>
python.exepythonw.exepython_d.exe
pythonw_d.exezinit.tclLibN)r]r`rrVrr;rUrr)chmodrSrr(r?r
r'rcrr9r
startswithraddrwalkr!r@r-r)rr"rhrcopierrfsuffixrsuffixesbase_exerrootdirsfilestcldirrs                rrzEnvBuilder.setup_pythons""%%$$
77d?7%%t,77>>$'u%#Y(3;K;KA;N:O0PQ
.ww||GV4ww~~d+7??DtL77>>$/u-
.}} "zz'2GG$$RWW%5%5a%8%;<@PP,,.#+ ((+667NO H 
Z77++GOO<X&"
?ggll7F377??3'3Wf =>
?
((*)+1C1C)D	%D$!U*!#!1!1$!7!#goouf!M!ww~~f5KK/ ggll4< ggll6:>S1	+'
 s
A
N<=7Oc6|jg|}tjjx|d<}|j|d<|jdd|jdd|j|d<|j|d<t
j|fi|y)z8Executes the newly created Python using safe-ish optionsenvVIRTUAL_ENV
PYTHONHOMEN
PYTHONPATHcwdrU)rarenvironcopyr!pop
subprocesscheck_output)rr"py_argskwargsrrs      r_call_new_pythonzEnvBuilder._call_new_pythonVs$$/w/ jjoo//u
$__Md#d#u
&33|//rcN|j|ddddtjy)z1Installs or upgrades pip in a virtual environment-m	ensurepipr{z
--default-pip)stderrN)rrSTDOUTrr"s  rrzEnvBuilder._setup_pipes)gt[+-j6G6G		Irctjjtjjt}tjj|d}|j
||y)a
        Set up scripts into the created environment from a directory.

        This method installs the default scripts into the environment
        being created. You can prevent the default installation by overriding
        this method if you really need to, or if you need to specify
        a different location for the scripts to install. By default, the
        'scripts' directory in the venv package is used as the source of
        scripts to install.
        rEN)rrrrfrr(install_scripts)rr"rs   rrzEnvBuilder.setup_scriptsjsGwwrwwx89ww||D),Wd+rcy)a
        Hook for post-setup modification of the venv. Subclasses may install
        additional packages or scripts here, add activation shell scripts, etc.

        :param context: The information for the environment creation request
                        being processed.
        Nrs  rrzEnvBuilder.post_setupys	
rc|jd|j}|jd|j}|jd|j}|jd|j}|jd|j
}|S)ai
        Replace variable placeholders in script text with context-specific
        variables.

        Return the text passed in , but with variables replaced.

        :param text: The text in which to replace placeholder variables.
        :param context: The information for the environment creation request
                        being processed.
        __VENV_DIR__
__VENV_NAME____VENV_PROMPT____VENV_BIN_NAME____VENV_PYTHON__)replacer!rRrr_r`)rtextr"s   rreplace_variableszEnvBuilder.replace_variablesst||NGOO<||OW-=-=>||-w~~>||/1A1AB||-w?rc|j}t|}tj|D]\}}}||k(r1|ddD](}|dtjfvs|j|*>|D]}	tjdk(r#|	j
dr|	jdr:tjj||	}
||djtjdd}|s|}n tjj|g|}tjj|stj|tjj||	}
t|
d5}	|	j}ddd|
jds5	j!d}|j#||}|j%d}gt|
d
5}	|	j-|dddt/j0|
|
y#1swYxYw#t&$r#}d}t(j+d	|
|Yd}~zd}~wwxYw#1swYaxYw)as
        Install scripts into the created environment from a directory.

        :param context: The information for the environment creation request
                        being processed.
        :param path:    Absolute pathname of a directory containing script.
                        Scripts in the 'common' subdirectory of this directory,
                        and those in the directory named for the platform
                        being run on, are installed in the created environment.
                        Placeholder variables are replaced with environment-
                        specific values.
        Ncommonrur)rz.pdbrbroz+unable to copy script %r, may be binary: %swb)r]lenrrr;r+rrrr(rQsepr?r@rreaddecoderencodeUnicodeErrorrdrerr-copymode)rr"rrhplenrrrrBrsrcfilerdstdirdstfiledataes                rrzEnvBuilder.install_scriptss""4y!#!	6D$t|a'A277 33A'
6GGtOX(>JJ'78'',,tQ/de**2662126$FWW\\';F;Fww~~f-KK''',,vq1'4($A668D$''(89H#{{73#55dGD#{{73
#gt,&
&OOGW57
6
!	6&$$(H#(;<CQHHH
&&s01H4H# IH #	I,I

IIctjdtd|j|j|ddddgty)Nz
Upgrading z
 packages in rrinstallr{)rddebugCORE_VENV_DEPSr]rrs  rr zEnvBuilder.upgrade_dependenciessJ(
g6F6F5GH	
	gtUI{	/-	/r)FFFFFNF)F)__name__
__module____qualname____doc__rr$r0r<rrrr;rrrrrrrrr rrrrrsx2:?GK#)/8"BCJ*DX
ww$	*&)	&V;z
0I

,
$06d/rrcHt||||||}|j|y)z,Create a virtual environment in a directory.)rr	r
rrrN)rr$)r!rr	r
rrrbuilders        rr$r$s,.B$x( &\CGNN7rc
ddl}|jtdd}|jdddd	|jd
ddd
dtj
dk(rd}nd}|j
}|jd|ddd|jd|ddd|jddddd|jddddd|jddddd !|jd"d#$|jd%ddd&d'd(jtd)|j|}|jr|jrtd*t|j|j|j|j|j |j"|j$+}|j&D]}|j)|y),NrzFCreates virtual Python environments in one or more target directories.z|Once an environment has been created, you may wish to activate it, e.g. by sourcing an activate script in its bin directory.)progdescriptionepilogrENV_DIR+z)A directory to create the environment in.)metavarnargshelpryF
store_truesystem_sitezDGive the virtual environment access to the system site-packages dir.)defaultactiondestrruTrvr
z[Try to use symlinks rather than copies, when symlinks are not the default for the platform.rwstore_falsez\Try to use copies rather than symlinks, even when symlinks are the default for the platform.rzr	zcDelete the contents of the environment directory if it already exists, before environment creation.r{rzlUpgrade the environment directory to use this version of Python, assuming Python has been upgraded in-place.rxrz]Skips installing or upgrading pip in the virtual environment (pip is bootstrapped by default))rrrrz--promptz;Provides an alternative prompt prefix for this environment.)rr|rzUpgrade core dependencies (z, z) to the latest version in PyPIz1you cannot supply --upgrade and --clear together.)rr	r
rrrr)argparseArgumentParserradd_argumentrr;add_mutually_exclusive_groupr(r
parse_argsrr	rArrr
rrrrr$)rrparseruse_symlinksgroupoptionsrrBs        rmainr
s(

$
$(2@-D%	EF	HJ
0%+-9:
ww$//1E	|\*,-

z|+;+*,-
	5$,CD
U<&.KL
j $]+,

12(%+:499^;T:UV==>%G7==LMMg.A.A&}}")"2"2!(")"2"2 '&-&:&:
<G\\qr__main__rDz	Error: %s)file)FFFFNFr&)rloggingrr-rrSr9rOr	getLoggerrrdrr$r
rcrrprintrexitrrr<module>rs	

			8	$x/x/v
7<EJCLz	
B0

CHHRL
0
kAoCJJ//0s	A,,B1B

B