
    F\hy                     F   S r SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSr	\R                  " \5      r " S S5      r  S\" 5       S.S jjrSS jr\S	:X  a  S
r \" 5         Sr\R,                  " \5        gg! \ a  r\" S\-  \R*                  S9   SrCN3SrCff = f)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)pipc                       \ rS rSrSr   S\" 5       S.S jjrS rS rS r	\
S	 5       rS
 rS rSS jrS r\R"                  S:w  a  S rOS rS rS rS rS rS rS rS rSrg)
EnvBuilder   a   
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
:param scm_ignore_files: Create ignore files for the SCMs specified by the
                         iterable.
Nscm_ignore_filesc                $   Xl         X l        X0l        X@l        XPl        X`l        US:X  a2  [        R                  R                  [        R                  " 5       5      nX`l
        Xpl        [        [        [        R                  U5      5      U l        g )N.)system_site_packagesclearsymlinksupgradewith_piporig_promptospathbasenamegetcwdpromptupgrade_deps	frozensetmapstrlowerr   )	selfr   r   r   r   r   r   r   r   s	            $/usr/lib/python3.13/venv/__init__.py__init__EnvBuilder.__init__1   si     %9!
  !S=WW%%biik2F( )#cii9I*J K    c                 N   [         R                  R                  U5      nU R                  U5      nU R                   H  n[        U SU S35      " U5        M     U R                  nSU l        U R                  U5        U R                  U5        U R                  (       a  U R                  U5        U R                  (       d"  U R                  U5        U R                  U5        U(       a  SU l        U R                  U5        U R                  (       a  U R                  U5        gg)zr
Create a virtual environment in a directory.

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

create__ignore_fileFTN)r   r   abspathensure_directoriesr   getattrr   create_configurationsetup_pythonr   
_setup_pipr   setup_scripts
post_setupr   upgrade_dependencies)r   env_dircontextscmtrue_system_site_packagess        r   createEnvBuilder.create@   s     ''//'*))'2((CDGC556w? ) %)$=$=!$)!!!'*'"==OOG$||w'OOG$$ )-D%%%g.%%g. r   c                    [         R                  " U5       H  n[         R                  R                  X5      n[         R                  R	                  U5      (       d$  [         R                  R                  U5      (       a  [         R                  " U5        M  [         R                  R                  U5      (       d  M  [        R                  " U5        M     g N)
r   listdirr   joinislinkisfileremoveisdirshutilrmtree)r   r   fns      r   clear_directoryEnvBuilder.clear_directory^   sv    **T"Bd'Bww~~b!!RWW^^B%7%7		"r""b! #r   c                 <    UUUUS.n[         R                  " USUS9$ )N)baseplatbaseinstalled_baseinstalled_platbasevenv)schemevars)	sysconfigget_path)r   r,   namerF   s       r   
_venv_pathEnvBuilder._venv_pathf   s,    %")	
 !!$vDAAr   c                    [         R                  S:X  a  [        R                  R	                  U5      [        R                  R	                  U5      :X  a  gSSKn UR                  [        R                  " U5      5      n UR                  [        R                  " U5      5      n[        R                  R	                  U5      [        R                  R	                  U5      :X  a  ggX:H  $ ! [         a     Nxf = f! [         a     Nbf = f)zCheck whether two paths appear the same.

Whether they refer to the same file is irrelevant; we're testing for
whether a human reader would look at the path string and easily tell
that they're the same file.
win32Tr   NF)	sysplatformr   r   normcase_winapiGetLongPathNamefsdecodeOSError)clspath1path2rQ   s       r   
_same_pathEnvBuilder._same_patho   s     <<7"ww&"''*:*:5*AA//E0BC//E0BC ww&"''*:*:5*AA>!    s$   %C, %C< ,
C98C9<
D	D	c                 D   S n[         R                  [         R                  " U5      ;   a   [        SU S[         R                   S35      e[         R                  R                  U5      (       a"  U R                  (       a  U R                  U5        [        R                  " 5       nXl
        [         R                  R                  U5      S   Ul        U R                  b  U R                  OUR                  Ul        U" U5        [        R                  nU(       d  [        S5      e[         R                  R                  [         R                  R!                  U5      5      u  pV[        R"                  S:X  a@  [         R                  R%                  U5      S   R'                  S	5      (       a  S	OS
nSU S3nXCl        XSl        Xcl        U R/                  US5      nU R/                  US5      n	U R/                  US5      n
Xl        U" U	5        Xl        U" U
5        [        R4                  S:  a  [         R6                  S:X  ao  [        R"                  S:w  a[  [         R                  R9                  US5      n[         R                  R                  U5      (       d  [         R:                  " SU5        Xl        [         R                  R?                  X5      Ul         [         R                  R9                  X5      Ul!        U" U5        URB                  Ul"        [        R"                  S:X  ap  [         R                  RG                  URB                  5      nU RI                  XRB                  5      (       d'  [J        RM                  SURB                  U5        Xl"        U$ )z
Create the directories for the environment.

Returns a context object which holds paths in the environment,
for use by subsequent logic.
c                 &   [         R                  R                  U 5      (       d  [         R                  " U 5        g [         R                  R	                  U 5      (       d$  [         R                  R                  U 5      (       a  [        SU -  5      eg )NzUnable to create directory %r)r   r   existsmakedirsr6   r7   
ValueError)ds    r   create_if_needed7EnvBuilder.ensure_directories.<locals>.create_if_needed   s[    77>>!$$A""bggnnQ&7&7 !@1!DEE '8r   zRefusing to create a venv in z( because it contains the PATH separator r
      zUnable to determine path to the running Python interpreter. Provide an explicit path or check that your PATH environment variable is correctly set.rM   r   _d python.exescriptsincludepurelibl        posixdarwinlib64libzActual environment location may have moved due to redirects, links or junctions.
  Requested location: "%s"
  Actual location:    "%s")'r   pathsepfspathr^   r   r\   r   r=   typesSimpleNamespacer,   splitenv_namer   rN   _base_executabler#   rO   splitextendswith
executable
python_dir
python_exerJ   inc_pathlib_pathmaxsizerI   r5   symlinkbin_pathrelpathbin_nameenv_exeenv_exec_cmdrealpathrX   loggerwarning)r   r,   r`   r-   rw   dirnameexenamerc   binpathincpathlibpath	link_pathreal_env_exes                r   r$   EnvBuilder.ensure_directories   s   	F ::7++<WI F??Azzl!M N N77>>'""tzz  )'')!77==1!4(,(?WEUEU!))
 . / / 77==)DE<<7" ))'215>>tDD"Brd$'G'$$//'95//'95//'95"!"![[5 rww''9\\X%Wg6I77>>),,

5),"77??7<'',,w8!  '<<7" 77++GOO<L??<AA  <  '	>
 (4$r   c                    [         R                  R                  UR                  S5      =Ul        n[        USSS9 nUR                  SUR                  -  5        U R                  (       a  SnOSnUR                  SU-  5        UR                  S	[        R                  S
S -  5        U R                  b   UR                  SU R                  < S35        UR                  S[         R                  R                  [        R                  5      -  5        / n[         R                  S:H  nU(       a"  U R                  (       a  UR!                  S5        U(       d"  U R                  (       d  UR!                  S5        U R"                  (       d  UR!                  S5        U R                  (       a  UR!                  S5        U R$                  (       a  UR!                  S5        U R&                  (       a  UR!                  S5        U R(                  (       a  UR!                  S5        U R*                  b  UR!                  SU R*                   S35        U R,                  (       d  UR!                  S5        UR!                  UR                  5        SR                  U5      nUR                  S[        R                   SU S35        S
S
S
5        g
! , (       d  f       g
= f)a  
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.cfgwutf-8encodingz
home = %s
truefalsez"include-system-site-packages = %s
zversion = %d.%d.%d
N   z	prompt = 
zexecutable = %s
nt
--symlinks--copies--without-pip--system-site-packages--clear	--upgrade--upgrade-depsz
--prompt=""--without-scm-ignore-files z
command = z	 -m venv )r   r   r5   r,   cfg_pathopenwriterx   r   rN   version_infor   r   rw   rI   r   appendr   r   r   r   r   r   )r   r-   r   finclargsr   s          r   r&   EnvBuilder.create_configuration   s    #%'',,w"MM4$g.!GGMG$6$667((GG9D@AGG*S-=-=bq-AAB{{&)DKK?"56GG'"''*:*:3>>*JJKDDBdmmL)dmmJ'==O,((45zzI&||K(  ,-+j)9)9(:!<=((89KK(88D>DGGj 0	$rBCE /..s   JK
Kc                 ^   [         R                  S:w  d   eU R                  (       + nU(       d   [         R                  R	                  U5      (       d  U(       aw  [         R                  R                  U5      [         R                  R                  U5      :X  d   e[         R                  " [         R                  R                  U5      U5        O[         R                  " X5        U(       a  [        R                  " X5        gg! [         a    [        R                  SX5        Sn NCf = f)z
Try symlinking a file, and if that fails, fall back to copying.
(Unused on Windows, because we can't just copy a failed symlink file: we
switch to a different set of files instead.)
r   Unable to symlink %r to %rTN)r   rI   r   r   r6   r   r}   r   	Exceptionr   r   r:   copyfile)r   srcdstrelative_symlinks_ok
force_copys        r   symlink_or_copyEnvBuilder.symlink_or_copy  s     ww$&
	"ww~~c**+!wws3rwws7KKKK

277#3#3C#8#>

3, OOC%   ";SF!
"s   B!D D "D,+D,c                     [         R                  R                  UR                  S5      n[	        USSS9 nUR                  S5        UR                  S5        SSS5        g! , (       d  f       g= f)z
Create a .gitignore file in the environment directory.

The contents of the file cause the entire environment directory to be
ignored by git.
z
.gitignorer   r   r   zC# Created by venv; see https://docs.python.org/3/library/venv.html
z*
N)r   r   r5   r,   r   r   )r   r-   gitignore_pathfiles       r   create_git_ignore_file!EnvBuilder.create_git_ignore_file  sU     goo|D.#8DJJ K LJJu 988s   #A""
A0r   c                 h   UR                   nUR                  nU R                  nUR                  nU" UR                  U5        [
        R                  R                  U5      (       d  [
        R                  " US5        SSS[        R                  S    34 H  n[
        R                  R                  X&5      n[
        R                  R                  U5      (       a  MH  U" UR                  USS9  [
        R                  R                  U5      (       a  M  [
        R                  " US5        M     g)	
Set up a Python executable in the environment.

:param context: The information for the environment creation request
                being processed.
i  re   python3zpython3.rb   T)r   N)r~   r   r   rx   rw   r   r   r6   chmodrN   r   r5   r\   )r   r-   r   r   copierr   suffixs          r   r'   EnvBuilder.setup_python%  s     &&G??D))F((G7%%t,77>>$''u%#Y%c&6&6q&9%:;=ww||G4ww~~d++ 7??DtL77>>$//u-=r   c                    UR                   nUR                  n[        R                  R	                  UR
                  5      n[        R                  R                  U5      S   n[        R                  R                  U5      R                  S5      (       a  SOSn[        R                  " 5       (       a  UnOB[        R                  R                  [        R                  R                  [        5      SS5      n[        R                  " S5      (       d  [        R                  R                  USU S35      n[        R                  R                  US	U S35      n	S
USU S3USU	S	U S3U	0n
[        R                  R                  USU S35      n[        R                  R                  USU S35      n	S
USU S3USU	S	U S3U	0nGOS[        R                   S    S3n[        R                  R                  USU U S35      n[        R                  R                  US	U U S35      n	S
USU S3USU S3USU U S3USU	S	U S3U	S	U S3U	S	U U S3U	0n
[        R                  R                  USU S35      n[        R                  R                  USU S35      n	S
USU S3USU S3USU U S3USU	S	U S3U	S	U S3U	S	U U S3U	0nSnU R"                  (       Ga5  SnU
R%                  [        R&                  " U5       Vs0 s H  n[        R                  R                  U5      R)                  S5      (       d  M8  [        R                  R                  [        R                  R                  U5      S   5      S:X  d  M}  U[        R                  R                  X>5      _M     sn5        / nU
R+                  5        HO  u  nn[        R                  R                  UU5      n [        R,                  " UU5        UR/                  U5        MQ     U(       aR  UR+                  5        H>  u  nn[        R                  R                  UU5      n [8        R:                  " UU5        M@     [        R                  " 5       (       Ga  [        R<                  " UR                  5       H  u  nnnSU;   d  M  [        R                  R	                  U5      n[        R                  R                  UR>                  SU5      n[        R                  RA                  U5      (       d  [        RB                  " U5        [        R                  R                  US5      n[        R                  R                  US5      n[8        RD                  " UU5          g   ggs  snf ! [0         a{    [2        R5                  SUU5        SnU HA  n [        R6                  " U5        M  ! [0         a    [2        R5                  SU5         M?  f = f   [2        R5                  S5           GM  f = f! [0         a    [2        R5                  SUU5         GM  f = f)r   r   rc   rd   rg   r   Py_GIL_DISABLEDre   rf   pythonwz
python.exezpythonw.exevenvlaunchervenvwlauncherz3.rb   tvenvlaunchertvenvwlaunchertTF)re   	vcruntimez.dllr   zFailed to clean up symlink %rzRetrying with copieszUnable to copy %r to %rzinit.tclLibN)#r~   rx   r   r   r   r   ru   rP   rv   rG   is_python_buildr5   r   __file__get_config_varrN   r   r   updater4   
startswithitemsr}   r   rT   r   r   unlinkr:   copy2walkr,   r\   r]   r   )r   r-   r   r   r   exe_stemexe_drg   ry   pythonw_exelink_sourcescopy_sourcesexe_t	do_copiesr   	to_unlinkdestr   rootdirsfilestcldirr   s                          r   r'   r   >  s    &&G((Ggg&&w7Gww''03HGG,,X6??EED2E((**!'',,rwwx'@'0$8++,=>>WW\\'VE7$3GH
 ggll7geWD4IJ *UG4(*!;eWD);	   WW\\'\%3MN
 ggll7mE7$4OP *UG4(*!;eWD);	  S--a013WW\\'VE75'3NO
 ggll7geWUG44PQ *UG4(*UG4(*UGE7$/!;eWD);eWD);eWUG40+	   WW\\']5'3NO
 ggll7nUG44PQ *UG4(*UG4(*UGE7$/!;eWD);eWD);eWUG40+	  I}}}!	 ##9;G9L%9LAww''*556MN 0(()9)9!)<Q)?@FJ 0Arww||G//9L%  	!-!3!3!5ID#77<<6D

3-!((.	 "6" !-!3!3!5ID#77<<6DMS$/ "6 ((**)+1C1C)D%D$!U*!#!1!1$!7!#goouf!M!ww~~f55KK/ ggll4< ggll6:>S1 *E +A% # 
'CS$O$(	!*A2 "		!#* 2 &/N/0!22 "+ '=>
" # M'@#tLLMs[   7VAV$V/(V$X,$(X)W%#X)% X		X)X			X)(X),!YYc                 8   UR                   /UQn[        R                  R                  5       =US'   nUR                  US'   UR                  SS5        UR                  SS5        UR                  US'   UR                   US'   [        R                  " U40 UD6  g)z8Executes the newly created Python using safe-ish optionsenvVIRTUAL_ENV
PYTHONHOMEN
PYTHONPATHcwdrw   )r   r   environcopyr,   pop
subprocesscheck_output)r   r-   py_argskwargsr   r   s         r   _call_new_pythonEnvBuilder._call_new_python  s     $$/w/ jjoo//u$__Md#d#u&33|//r   c           	          U R                  USSSS[        R                  S9  g
! [        R                   a  n[        R
                  " S5      n[        R                  R                  U S35      (       dN  [        SR                  [        R                  " 5       UR                  5      5        [        R                  " S	5        e S
nAff = f)z1Installs or upgrades pip in a virtual environment-m	ensurepipr   z--default-pip)stderrstdlibz/ensurepip/__main__.pyan  The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

    apt install python{}-venv

You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.

Failing command: {}
rb   N)r   r   STDOUTCalledProcessErrorrG   rH   r   r   r\   printformatget_python_versionr   rN   exit)r   r-   errr   s       r   r(   EnvBuilder._setup_pip  s    	!!'4k"1*:K:K " M,, 	''1F77>>VH,B"CDD  F9'')7+?+?@B !	s   "% C
BCC
c                     [         R                  R                  [         R                  R                  [        5      5      n[         R                  R                  US5      nU R                  X5        g)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.
rg   N)r   r   r#   r   r   r5   install_scripts)r   r-   r   s      r   r)   EnvBuilder.setup_scripts  sE     wwrwwx89ww||D),W+r   c                     g)z
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.
N r   r-   s     r   r*   EnvBuilder.post_setup  s     	r   c                    UR                   UR                  UR                  UR                  UR                  S.nS nS n[
        R                  nUR                  nUR                  S5      (       a  UnO)UR                  S5      (       a  UnO[
        R                  nUR                  5        VV	s0 s H  u  pX" U	5      _M     nnn	UR                  5        H  u  pUR                  X5      nM     U$ s  sn	nf )a1  
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__c                 2    U R                  SS5      n SU  S3$ )a  
This should satisfy PowerShell quoting rules [1], unless the quoted
string is passed directly to Windows native commands [2].
[1]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules
[2]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_parsing#passing-arguments-that-contain-quote-characters
'z'')replacess    r   	quote_ps1/EnvBuilder.replace_variables.<locals>.quote_ps1  s!     		#t$Aqc8Or   c                     U $ r3   r  r  s    r   	quote_bat/EnvBuilder.replace_variables.<locals>.quote_bat	  s    Hr   z.ps1z.bat)r,   rs   r   r   r   shlexquotescript_pathrv   r   r  )r   textr-   replacementsr  r  r  r  keyr  quoteds              r   replace_variablesEnvBuilder.replace_variables  s     $OO$--&~~!(!1!1&
		 ))''E!!&))E KKE4@4F4F4HI4H&#U1X4HI'--/KC<<,D 0 Js   2C5c                 ~   UR                   n[        U5      n[        R                  S:X  a  S nOS n[        R                  " U5       GH  u  pgnXb:X  a7  USS  H,  n	U	S[        R                  4;  d  M  UR                  U	5        M.     MC  U GH  n
U" U
5      (       a  M  [        R                  R                  Xj5      nXdS R                  [        R                  5      SS nU(       d  UnO![        R                  R                  " U/UQ76 n[        R                  R                  U5      (       d  [        R                  " U5        [        R                  R                  X5      n[        R                  S:X  a/  UR                  S5      (       a  [        R                  " X5        GM  [        US5       n
U
R!                  5       nSSS5         Xl        U R%                  WR'                  S	5      U5      R)                  S	5      nUU:X  a  [        R                  " X5        GM  [        US5       n
U
R1                  U5        SSS5        [        R2                  " X5        GM     GM!     g! , (       d  f       N= f! [*         a#  n[,        R/                  S
UU5         SnAGM  SnAff = f! , (       d  f       Np= f)a#  
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.
r   c                     [         R                  R                  U 5      n U R                  S5      =(       a    U R	                  S5      $ )N)re   rD   rf   z.pdb)r   r   rP   r   rv   r   s    r   	skip_file-EnvBuilder.install_scripts.<locals>.skip_file,  s:    GG$$Q'%78 9JJ'78:r   c                     g)NFr  r   s    r   r!  r"  1  s    r   Ncommon   r  rbr   z+unable to copy script %r, may be binary: %swb)r~   lenr   rI   r   r8   r   r5   rr   sepr\   r]   rv   r:   r   r   readr  r  decodeencodeUnicodeErrorr   r   r   copymode)r   r-   r   r   plenr!  r   r   r   r_   r   srcfiler   dstdirdstfiledatanew_dataes                     r   r   EnvBuilder.install_scripts  s    ""4y77d?:
!#D|aA277 33A ! Q<<'',,t/e**2662126$FWW\\';F;Fww~~f--KK''',,v177d?w'7'78H'I'ILL2'4(A668D )	*1'..t{{7/CWM#VG_  t#LL2gt,) -OOG5A  "/* )( $ NN $78?D -,s0   7I-6I>2J.-
I;>
J+J&&J+.
J<c                     [         R                  S[         SUR                   35        U R                  " USSSS/[        Q76   g )Nz
Upgrading z packages in r   r   installr   )r   debugCORE_VENV_DEPSr~   r   r  s     r   r+   EnvBuilder.upgrade_dependencies[  sH    (g6F6F5GH	
 	gtUI{ 	/-	/r   )	r   r   r   r   r   r   r   r   r   )FFFFFNF)F)__name__
__module____qualname____firstlineno____doc__r   r   r0   r=   rJ   classmethodrX   r$   r&   r   r   r   rI   r'   r   r(   r)   r*   r  r   r+   __static_attributes__r  r   r   r   r      s    6 :?GK#L9BL/<"B " "4GR,D\&, 
ww$	.2m	^0.,.`=6~/r   r   r   c          
      @    [        UX#UXVUS9nUR                  U 5        g)z,Create a virtual environment in a directory.)r   r   r   r   r   r   r   N)r   r0   )	r,   r   r   r   r   r   r   r   builders	            r   r0   r0   c  s*     .B$( &*:<G NN7r   c                    SS K nUR                  [        SSS9nUR                  SSSSS	9  UR                  S
SSSSS9  [        R
                  S:X  a  SnOSnUR                  5       nUR                  SUSSSS9  UR                  SU(       + SSSS9  UR                  SSSSSS9  UR                  SSSSSS9  UR                  SSSSS S!9  UR                  S"S#S$9  UR                  S%SSS&S'S(R                  [        5       S)3S9  UR                  S*S+S,[        5       [        S-/5      S.S/9  UR                  U 5      nUR                  (       a  UR                  (       a  [        S05      e[        UR                  UR                  UR                   UR                  UR"                  UR$                  UR&                  UR(                  S19nUR*                   H  nUR-                  U5        M     g )2Nr   zFCreates 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.)progdescriptionepilogr   ENV_DIR+z)A directory to create the environment in.)metavarnargshelpr   F
store_truesystem_sitezDGive the virtual environment access to the system site-packages dir.)defaultactionr   rM  r   Tr   r   z[Try to use symlinks rather than copies, when symlinks are not the default for the platform.r   store_falsez\Try to use copies rather than symlinks, even when symlinks are the default for the platform.r   r   zcDelete the contents of the environment directory if it already exists, before environment creation.r   r   zlUpgrade the environment directory to use this version of Python, assuming Python has been upgraded in-place.r   r   z]Skips installing or upgrading pip in the virtual environment (pip is bootstrapped by default))r   rP  rQ  rM  z--promptz;Provides an alternative prompt prefix for this environment.)rM  r   r   zUpgrade core dependencies (z, z) to the latest version in PyPIr   r   store_constgitzYSkips adding SCM ignore files to the environment directory (Git is supported by default).)r   rQ  constrP  rM  z1you cannot supply --upgrade and --clear together.)r   r   r   r   r   r   r   r   )argparseArgumentParserr<  add_argumentr   rI   add_mutually_exclusive_groupr5   r:  r   
parse_argsr   r   r^   r   rO  r   r   r   r   r   r   r0   )r   rV  parseruse_symlinksgroupoptionsrD  r_   s           r   mainr_  n  s`   $$(2@-D % 	EF 	H  J
0%+-9  : 
ww$//1E	|\*,  -
 
z|+;+*,  -
 	5$ ,C  D
 U<& .K  L
 j $]+  ,
 
1  2 (%+:499^;T:U V= =  > 4;M,IK )5' 2H  I
 %G7==LMMg.A.A&}}")"2"2!(")"2"2 '&-&:&:*1*B*BDG \\q r   __main__rb   z	Error: %s)r   )FFFFNFr3   )r@  loggingr   r:   r   rN   rG   rp   r  r:  	getLoggerr<  r   r   r   r0   r_  rcr   r5  r   r   r   r  r   r   <module>rd     s     	   
    			8	$K	/ K	/\ 7<EJ({IX z	
B0 HHRL 
  0kAoCJJ/0s   	A< <B BB 