§
    òyIfd  ã                  óê   — d dl mZ d dlZd dlZd dlmZ d dlmZ d dlm	Z	 d dl
mZmZ d dlmZ d dlmZ d d	lmZ d
dlmZ d
dlmZ d
dlmZ d
dlmZ dd„Zdd„Zdd„Zdd„Zd„ Zd„ Z d„ Z!d„ Z"ddgZ#dS )é    )ÚannotationsN)Úpartial)Úmake_app_data)ÚVirtualEnvConfigParser)ÚLEVELSÚsetup_report)ÚSession)Úmanual_upgrade)Ú__version__é   )ÚActivationSelector)ÚCreatorSelector)Úget_discover)ÚSeederSelectorTc                ó¦   — |€t           j        n|}t          | |||¦  «        }|5  |                     ¦   «          ddd¦  «         n# 1 swxY w Y   |S )aó  
    Create a virtual environment given some command line interface arguments.

    :param args: the command line arguments
    :param options: passing in a ``VirtualEnvOptions`` object allows return of the parsed options
    :param setup_logging: ``True`` if setup logging handlers, ``False`` to use handlers already registered
    :param env: environment variables to use
    :return: the session object of the creation (its structure for now is experimental and might change on short notice)
    N)ÚosÚenvironÚsession_via_cliÚrun)ÚargsÚoptionsÚsetup_loggingÚenvÚ
of_sessions        úK/var/www/piapp/venv/lib/python3.11/site-packages/virtualenv/run/__init__.pyÚcli_runr      s—   € ð ˜�"Œ*ˆ*¨€CÝ   w°¸sÑCÔC€JØ	ð ð Ø�ŠÑÔÐðð ð ñ ô ð ð ð ð ð ð øøøð ð ð ð àÐs   ¥AÁA
ÁA
c                óü   ‡— |€t           j        n|}t          | ‰||¦  «        \  }}|                     | ¦  «        Št	          ˆfd„|D ¦   «         ¦  «        \  }}}t          ‰j        ‰j        |j        |||¦  «        S )aq  
    Create a virtualenv session (same as cli_run, but this does not perform the creation). Use this if you just want to
    query what the virtual environment would look like, but not actually create it.

    :param args: the command line arguments
    :param options: passing in a ``VirtualEnvOptions`` object allows return of the parsed options
    :param setup_logging: ``True`` if setup logging handlers, ``False`` to use handlers already registered
    :param env: environment variables to use
    :return: the session object of the creation (its structure for now is experimental and might change on short notice)
    Nc              3  óB   •K  — | ]}|                      ‰¦  «        V — Œd S ©N)Úcreate)Ú.0Úer   s     €r   ú	<genexpr>z"session_via_cli.<locals>.<genexpr>3   s/   øè è € Ð'LÐ'L¸a¨¯ª°Ñ(9Ô(9Ð'LÐ'LÐ'LÐ'LÐ'LÐ'Ló    )	r   r   Úbuild_parserÚ
parse_argsÚtupler	   Ú	verbosityÚapp_dataÚ_interpreter)	r   r   r   r   ÚparserÚelementsÚcreatorÚseederÚ
activatorss	    `       r   r   r   %   s•   ø€ ð ˜�"Œ*ˆ*¨€CÝ# D¨'°=À#ÑFÔFÑ€FˆHØ×Ò Ñ%Ô%€GÝ"'Ð'LÐ'LÐ'LÐ'LÀ8Ð'LÑ'LÔ'LÑ"LÔ"LÑ€GˆV�ZÝØÔØÔØÔØØØñô ð r$   c                óL  — t          ||€t          j        n|¦  «        }t          |¦  «         |                     ddddd¬¦  «         t          || |¦  «         t          | ||¦  «        }t          |¦  «         t          || ¦  «        }|j	        x|_
        }|€d|› �}t          |¦  «        ‚t          ||¦  «        t          ||¦  «        t          ||¦  «        g}|                     | ¦  «        \  }}	|D ]}
|
                     |¦  «         Œ|                     ¦   «          ||fS )Nz--with-tracebackÚwith_tracebackÚ
store_trueFz>on failure also display the stacktrace internals of virtualenv)ÚdestÚactionÚdefaultÚhelpzfailed to find interpreter for )r   r   r   Úadd_version_flagÚadd_argumentÚ_do_report_setupÚload_app_dataÚhandle_extra_commandsr   Úinterpreterr*   ÚRuntimeErrorr   r   r   Úparse_known_argsÚhandle_selected_arg_parseÚenable_help)r   r   r   r   r+   Údiscoverr<   Úmsgr,   Ú_Úelements              r   r%   r%   >   sR  € Ý# G¸3¸;­R¬Z¨ZÈCÑPÔP€FÝ�VÑÔÐØ
×ÒØØØØØMð ñ ô ð õ �V˜T =Ñ1Ô1Ð1Ý˜D &¨'Ñ2Ô2€GÝ˜'Ñ"Ô"Ð"å˜F DÑ)Ô)€HØ(0Ô(<Ð<€FÔ˜+ØÐØ:°Ð:Ð:ˆÝ˜3ÑÔÐå˜ VÑ,Ô,Ý�{ FÑ+Ô+Ý˜;¨Ñ/Ô/ð€Hð
 ×(Ò(¨Ñ.Ô.�J€GˆQØð 3ð 3ˆØ×)Ò)¨'Ñ2Ô2Ð2Ð2Ø
×ÒÑÔÐØ�8ÐÐr$   c                ó,   — t          | ¦  «        d         S )z0Used to provide a parser for the doc generation.r   )r%   )r   s    r   Úbuild_parser_onlyrF   ]   s   € å˜ÑÔ˜aÔ Ð r$   c                óf   — | j         r)t          | j        | j        ¦  «        }t	          |¦  «        ‚d S r   )Úupgrade_embed_wheelsr
   r)   r   Ú
SystemExit)r   Úresults     r   r;   r;   b   s9   € ØÔ#ð !Ý Ô 0°'´+Ñ>Ô>ˆÝ˜Ñ Ô Ð ð!ð !r$   c           
     óâ  — |                      ddd¬¦  «         |                     | |¬¦  «        \  }}|                      ddt          t          |j        |j        ¬¦  «        t          d |j        |j        ¬¦  «        ¬	¦  «         |                      d
dd¬¦  «         |                      ddd¬¦  «         |                     | |¬¦  «        \  }}|j        r|j                             ¦   «          |S )Nz--read-only-app-datar2   zMuse app data folder in read-only mode (write operations will fail with error))r4   r6   )Ú	namespacez
--app-dataz-a data folder used as cache by the virtualenv)Ú	read_onlyr   )r6   Útyper5   z--reset-app-dataz start with empty app data folderz--upgrade-embed-wheelsz.trigger a manual update of the embedded wheels)	r8   r>   r   r   Úread_only_app_datar   Úreset_app_datar)   Úreset)r   r+   r   rC   s       r   r:   r:   h   s,  € Ø
×ÒØØØ\ð ñ ô ð ð
 ×(Ò(¨¸Ð(ÑAÔA�J€GˆQð ×ÒØØ<Ý•]¨gÔ.HÈgÌkÐZÑZÔZÝ˜d¨gÔ.HÈgÌkÐZÑZÔZð	 ñ ô ð ð ×ÒØØØ/ð ñ ô ð ð
 ×ÒØ ØØ=ð ñ ô ð ð
 ×(Ò(¨¸Ð(ÑAÔA�J€GˆQØÔð !ØÔ×ÒÑ Ô Ð Ø€Nr$   c                ó`   — dd l }|                      dddt          › d|j        › �d¬¦  «         d S )Nr   z	--versionÚversionz	%(prog)s z from zIdisplay the version of the virtualenv package and its location, then exit)r4   rS   r6   )Ú
virtualenvr8   r   Ú__file__)r+   rT   s     r   r7   r7   ‡   sT   € ØÐÐÐà
×ÒØØØD�KÐDÐD¨zÔ/BÐDÐDØXð	 ñ ô ð ð ð r$   c           	     ó  — d                      d„ t          t          j        ¦   «         ¦  «        D ¦   «         ¦  «        }d}|                      d|                     t          j        t          d         ¦  «        |¦  «        ¬¦  «        }|                     ¦   «         }| 	                    ddd	d
dd¬¦  «         | 	                    ddd	ddd¬¦  «         |  
                    |¦  «        \  }}|rt          |j        ¦  «         d S d S )Nz, c              3  óN   K  — | ] \  }}t          j        |¦  «        › d |› �V — Œ!dS )ú=N)ÚloggingÚgetLevelName)r!   ÚcÚlines      r   r#   z#_do_report_setup.<locals>.<genexpr>“   s?   è è € ÐdÐdÁ'À!ÀT�WÔ1°$Ñ7Ô7Ð=Ð=¸!Ð=Ð=ÐdÐdÐdÐdÐdÐdr$   z6verbosity = verbose - quiet, default {}, mapping => {}r(   é   )ÚtitleÚdescriptionz-vz	--verboseÚcountÚverbosezincrease verbosityé   )r4   r3   r6   r5   z-qz--quietÚquietzdecrease verbosityr   )ÚjoinÚsortedr   ÚitemsÚadd_argument_groupÚformatrY   rZ   Úadd_mutually_exclusive_groupr8   r>   r   r(   )	r+   r   r   Ú	level_maprB   Úverbosity_groupr(   ÚoptionrC   s	            r   r9   r9   ’   s  € Ø—	’	ÐdÐdÍVÕTZÔT`ÑTbÔTbÑMcÔMcÐdÑdÔdÑdÔd€IØ
B€CØ×/Ò/ØØ—J’J�wÔ3µF¸1´IÑ>Ô>À	ÑJÔJð 0ñ ô €Oð  ×<Ò<Ñ>Ô>€IØ×Ò˜4 °WÀ9ÐSgÐqrÐÑsÔsÐsØ×Ò˜4 °7ÀÐOcÐmnÐÑoÔoÐoØ×'Ò'¨Ñ-Ô-�I€FˆAØð 'Ý�VÔ%Ñ&Ô&Ð&Ð&Ð&ð'ð 'r$   r   r   )NTN)NNTNr   )$Ú
__future__r   rY   r   Ú	functoolsr   Úvirtualenv.app_datar   Úvirtualenv.config.cli.parserr   Úvirtualenv.reportr   r   Úvirtualenv.run.sessionr	   Ú&virtualenv.seed.wheels.periodic_updater
   Úvirtualenv.versionr   Úplugin.activatorsr   Úplugin.creatorsr   Úplugin.discoveryr   Úplugin.seedersr   r   r   r%   rF   r;   r:   r7   r9   Ú__all__© r$   r   ú<module>r{      s”  ðØ "Ð "Ð "Ð "Ð "Ð "à €€€Ø 	€	€	€	Ø Ð Ð Ð Ð Ð à -Ð -Ð -Ð -Ð -Ð -Ø ?Ð ?Ð ?Ð ?Ð ?Ð ?Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø *Ð *Ð *Ð *Ð *Ð *Ø AÐ AÐ AÐ AÐ AÐ AØ *Ð *Ð *Ð *Ð *Ð *à 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø *Ð *Ð *Ð *Ð *Ð *Ø *Ð *Ð *Ð *Ð *Ð *ðð ð ð ð"ð ð ð ð2ð ð ð ð>!ð !ð !ð !ð
!ð !ð !ðð ð ð>ð ð ð'ð 'ð 'ð  Øð€€€r$   