HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/virtualenv/run/__pycache__/__init__.cpython-310.pyc
o

3�hT�@s�ddlmZddlZddlZddlmZddlmZddlm	Z	ddl
mZmZddl
mZddlmZdd	lmZd
dlmZd
dlmZd
d
lmZd
dlmZd dd�Zd dd�Zd!dd�Zd"dd�Zdd�Zdd�Z dd�Z!dd�Z"ddgZ#dS)#�)�annotationsN)�partial)�
make_app_data)�VirtualEnvConfigParser)�LEVELS�setup_report)�Session)�manual_upgrade)�__version__�)�ActivationSelector)�CreatorSelector)�get_discover)�SeederSelectorTcCsR|durtjn|}t||||�}|�
|��Wd�|S1s"wY|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_session�r�B/usr/local/lib/python3.10/dist-packages/virtualenv/run/__init__.py�cli_runs


��rc	sl|durtjn|}t|�||�\}}|�|��|jj�_t�fdd�|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)
    Nc3s�|]}|���VqdS�N)�create)�.0�e�rrr�	<genexpr>4s�z"session_via_cli.<locals>.<genexpr>)rr�build_parser�
parse_args�_interpreter�version_info�
py_version�tupler�	verbosity�app_data)	rrrr�parser�elements�creator�seeder�
activatorsrr rr%s

�rcCs�t||dur	tjn|�}t|�|jdddddd�t|||�t|||�}t|�t||�}|j	|_
}|durBd|��}t|��t||�t
||�t||�g}|�|�\}}	|D]}
|
�|�qY|��||fS)Nz--with-traceback�with_traceback�
store_trueFz>on failure also display the stacktrace internals of virtualenv)�dest�action�default�helpzfailed to find interpreter for )rrr�add_version_flag�add_argument�_do_report_setup�
load_app_data�handle_extra_commandsr�interpreterr$�RuntimeErrorr
rr�parse_known_args�handle_selected_arg_parse�enable_help)rrrrr*�discoverr:�msgr+�_�elementrrrr"?s4�

�r"cCst|�dS)z0Used to provide a parser for the doc generation.r)r"�rrrr�build_parser_only^srDcCs |jrt|j|j�}t|��dSr)�upgrade_embed_wheelsr	r)r�
SystemExit)r�resultrrrr9cs�r9c	Cs�|jdddd�|j||d�\}}|jddtt|j|jd�td|j|jd�d	�|jd
ddd�|jddd
d�|j||d�\}}|jrI|j��|S)Nz--read-only-app-datar0zMuse app data folder in read-only mode (write operations will fail with error))r2r4)�	namespacez
--app-dataz-a data folder used as cache by the virtualenv)�	read_onlyr)r4�typer3z--reset-app-dataz start with empty app data folderz--upgrade-embed-wheelsz.trigger a manual update of the embedded wheels)	r6r<rr�read_only_app_datar�reset_app_datar)�reset)rr*rrArrrr8is4����
r8cCs,ddl}|jdddt�d|j��dd�dS)Nrz	--version�versionz	%(prog)s z from zIdisplay the version of the virtualenv package and its location, then exit)r2rNr4)�
virtualenvr6r
�__file__)r*rOrrrr5�s
�r5c	s�d�dd�tt���D��}d}|jd|�t�td�|�d�}|��}|j	dd	d
ddd
d�|j	ddd
dddd��rIt
�fdd�dD��rIdS|���\}}|rYt|j
�dSdS)Nz, css(�|]\}}t�|��d|��VqdS)�=N)�logging�getLevelName)r�c�linerrrr!�s�&z#_do_report_setup.<locals>.<genexpr>z6verbosity = verbose - quiet, default {}, mapping => {}r(�)�title�descriptionz-vz	--verbose�count�verbosezincrease verbosity�)r2r1r4r3z-qz--quiet�quietzdecrease verbosityrc3s�|]}|�vVqdSrr)r�irCrrr!�s�)z-hz--help)�join�sortedr�items�add_argument_group�formatrRrS�add_mutually_exclusive_groupr6�anyr<rr()	r*rr�	level_mapr@�verbosity_groupr(�optionrArrCrr7�s��r7)NTN)NNTNr)$�
__future__rrRr�	functoolsr�virtualenv.app_datar�virtualenv.config.cli.parserr�virtualenv.reportrr�virtualenv.run.sessionr�&virtualenv.seed.wheels.periodic_updater	�virtualenv.versionr
�plugin.activatorsr�plugin.creatorsr
�plugin.discoveryr�plugin.seedersrrrr"rDr9r8r5r7�__all__rrrr�<module>s2



�