bgfddlZddlZddlmZddlmZddlmZddlm Z m Z ddl m Z ddl mZdd lmZd d lmZd d lmZd d lmZd dlmZddZddZddZddZdZdZdZdZ ddgZ!dS)N)partial) make_app_data)VirtualEnvConfigParser)LEVELS setup_report)Session)manual_upgrade) __version__)ActivationSelector)CreatorSelector) get_discover)SeederSelectorTc| tjn|}t||||}|5|dddn #1swxYwY|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)osenvironsession_via_clirun)argsoptions setup_loggingenv of_sessions h/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/virtualenv/run/__init__.pycli_runrs "**C w sCCJ  sAA  A c| tjn|}t|||\}}||t fd|D\}}}t jj|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) Nc3BK|]}|VdSN)create).0ers r z"session_via_cli..0s/'L'La(9(9'L'L'L'L'L'L) rr build_parser parse_argstupler verbosityapp_data _interpreter) rrrrparserelementscreatorseeder activatorsrs ` rrr"s "**C#D'=#FFFH%%G"''L'L'L'L8'L'L'L"L"LGVZ*G,QSZ\bdnooJ r$cHt|| tjn|}t||dddddt |||t |||}t|t||}|j x|_ }|td|t||t||t||g}||\}}|D]} | ||||fS)Nz--with-tracebackwith_traceback store_trueFz>on failure also display the stacktrace internals of virtualenv)destactiondefaulthelpzfailed to find interpreter for )rrradd_version_flag add_argument_do_report_setup load_app_datahandle_extra_commandsr interpreterr* RuntimeErrorrrr parse_known_argshandle_selected_arg_parse enable_help) rrrrr+discoverr<r,_elements rr%r%5sN #G3;RZZC P PFV   M VT=111D&'22G'"""FD))H(0(<>   !!r$c |ddd|||\}}|ddtt|j|jtd|j|j |d dd |d dd |||\}}|jr|j|S)Nz--read-only-app-datar2zMuse app data folder in read-only mode (write operations will fail with error))r4r6) namespacez --app-dataz-a data folder used as cache by the virtualenv) read_onlyr)r6typer5z--reset-app-dataz start with empty app data folderz--upgrade-embed-wheelsz.trigger a manual update of the embedded wheels) r8r>rrread_only_app_datarreset_app_datar)reset)rr+rrBs rr:r:^s,  \ (((AAJGQ  < ]g.Hgk Z Z Zdg.HgkZZZ    /    = (((AAJGQ!   Nr$c`ddl}|dddtd|jddS)Nrz --versionversionz %(prog)s z from zIdisplay the version of the virtualenv package and its location, then exit)r4rRr6) virtualenvr8r __file__)r+rSs rr7r7}sT DKDDz/BDD X r$c ddttjD}d}|d|t jtd|}|}| ddd d d d | ddd ddd | |\}}|rt|j dSdS)Nz, c3NK|] \}}tj|d|V!dS)=N)logging getLevelName)r!cls rr#z#_do_report_setup..s?^^tq!W1!44::q::^^^^^^r$z6verbosity = verbose - quiet, default {}, mapping => {}r()title descriptionz-vz --verbosecountverbosezincrease verbosityr)r4r3r6r5z-qz--quietquietzdecrease verbosityr) joinsortedritemsadd_argument_groupformatrXrYadd_mutually_exclusive_groupr8r>rr() r+rr level_mapmsgverbosity_groupr(optionrBs rr9r9s  ^^vflnnG]G]^^^^^I BC//JJw3F1I>> JJ0O <<>>I 4W9Sgqrsss 47Ocmnooo''--IFA'V%&&&&&''r$rr)NTN)NNTNr)"rXr functoolsrr)rconfig.cli.parserrreportrr run.sessionr seed.wheels.periodic_updater rRr plugin.activatorsr plugin.creatorsrplugin.discoveryrplugin.seedersrrrr%rEr;r:r7r9__all__r$rrws $$$$$$666666))))))))!!!!!!888888!!!!!!111111,,,,,,************"&<!!!! !!! > ' ' '  r$