HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/virtualenv/run/__pycache__/__init__.cpython-37.pyc
B

���a��@s�ddlmZmZddlZddlZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZdd	lmZdd
lmZddlmZdd
lmZddlmZddlmZd"dd�Zd#dd�Zd$dd�Zd%dd�Zdd�Z dd�Z!dd�Z"dd �Z#d!Z$dS)&�)�absolute_import�unicode_literalsN)�partial�)�
make_app_data)�VirtualEnvConfigParser)�LEVELS�setup_report)�Session)�manual_upgrade)�__version__�)�ActivationSelector)�CreatorSelector)�get_discover)�SeederSelectorTc	Cs<|dkrtjn|}t||||�}|�|��WdQRX|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�H/opt/alt/python37/lib/python3.7/site-packages/virtualenv/run/__init__.py�cli_runs

rc
sf|dkrtjn|}t|�||�\}}|�|��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)Zcreate)�.0�e)rrr�	<genexpr>2sz"session_via_cli.<locals>.<genexpr>)	rr�build_parser�
parse_args�tupler
�	verbosity�app_data�_interpreter)
rrrr�parser�elementsZcreatorZseederZ
activatorsrr)rrr$s
rc
Cs�t||dkrtjn|�}t|�|jdddddd�t|||�t|||�}t|�t||�}|j	|_
}|dkr�td�|���t
||�t||�t||�g}|�|�\}}x|D]}	|	�|�q�W|��||fS)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 {})rrr�add_version_flag�add_argument�_do_report_setup�
load_app_data�handle_extra_commandsr�interpreterr&�RuntimeError�formatrrr�parse_known_argsZhandle_selected_arg_parseZenable_help)
rrrrr'Zdiscoverr4r(�_Zelementrrrr!7s.

r!cCst|�dS)z/Used to provide a parser for the doc generationr)r!)rrrr�build_parser_onlyUsr9cCs |jrt|j|j�}t|��dS)N)Zupgrade_embed_wheelsrr%r�
SystemExit)r�resultrrrr3Zsr3c	Cs�|jdddd�|j||d�\}}|jddtt|j|jd�td|j|jd�d	�|jd
ddd�|jddd
d�|j||d�\}}|jr�|j��|S)Nz--read-only-app-datar*zMuse app data folder in read-only mode (write operations will fail with error))r,r.)�	namespacez
--app-dataz-a data folder used as cache by the virtualenv)Z	read_onlyr)r.�typer-z--reset-app-dataz start with empty app data folderz--upgrade-embed-wheelsz.trigger a manual update of the embedded wheels)	r0r7rrZread_only_app_datarZreset_app_datar%�reset)rr'rr8rrrr2`s,
r2cCs(ddl}|jddd�t|j�dd�dS)Nrz	--version�versionz%(prog)s {} from {}zIdisplay the version of the virtualenv package and its location, then exit)r,r?r.)�
virtualenvr0r6r�__file__)r'r@rrrr/sr/c	Cs�d�dd�ttt����D��}d}|jd|�t�td�|�d�}|�	�}|j
dd	d
ddd
d�|j
ddd
dddd�|�|�\}}|r�t|j
�dS)Nz, css$|]\}}d�t�|�|�VqdS)z{}={}N)r6�logging�getLevelName)r�c�lrrrr �sz#_do_report_setup.<locals>.<genexpr>z6verbosity = verbose - quiet, default {}, mapping => {}r$�)�title�descriptionz-vz	--verbose�count�verbosezincrease verbosityr)r,r+r.r-z-qz--quiet�quietzdecrease verbosityr)�join�sorted�listr�itemsZadd_argument_groupr6rBrCZadd_mutually_exclusive_groupr0r7r	r$)	r'rrZ	level_map�msgZverbosity_groupr$Zoptionr8rrrr1�s r1)rr)NTN)NTN)NNTN)N)%Z
__future__rrrBr�	functoolsrr%rZconfig.cli.parserrZreportrr	Zrun.sessionr
Zseed.wheels.periodic_updaterr?rZplugin.activatorsrZplugin.creatorsrZplugin.discoveryrZplugin.seedersrrrr!r9r3r2r/r1�__all__rrrr�<module>s,