/usr/local/lib/python3.6/site-packages/virtualenv/create/__pycache__
NameSizeModeActions
creator.cpython-36.pyc74780644editdlrm
debug.cpython-36.pyc24880644editdlrm
describe.cpython-36.pyc48700644editdlrm
pyenv_cfg.cpython-36.pyc24070644editdlrm
__init__.cpython-36.pyc1510644editdlrm
Edit: /usr/local/lib/python3.6/site-packages/virtualenv/create/__pycache__/creator.cpython-36.pyc (7478B)
3 0Dg @sddlZddlZddlZddlZddlmZmZddlmZddl m Z ddl m Z ddl mZddlmZddlmZdd lmZdd lmZd d lmZeejjejZed ZGdddZGdddedZ ddZ!ddgZ"dS)N)ABCMetaabstractmethod)ArgumentTypeError) literal_eval) OrderedDict)Path)LogCmd) safe_delete)run_cmd) __version__)PyEnvCfgzdebug.pyc@seZdZddZdS) CreatorMetacCs d|_dS)N)error)selfrC/usr/local/lib/python3.6/site-packages/virtualenv/create/creator.py__init__szCreatorMeta.__init__N)__name__ __module__ __qualname__rrrrrrsrc@seZdZdZddZddZddZedd Zed d Z e d d Z eddZ ddZ ddZddZeddZeddZdS)CreatorzEA class that given a python Interpreter creates a virtual environmentcCsJ||_d|_t|j|_|j|_|j|_tj|j|_|j |_ |j |_ dS)zConstruct a new virtual environment creator. :param options: the CLI option as parsed from :meth:`add_parser_arguments` :param interpreter: the interpreter to create virtual environment from N) interpreter_debugrdestclear no_vcs_ignorer Z from_folder pyenv_cfgapp_dataenv)roptionsrrrrrs zCreator.__init__cCs(|jjddjdd|jDdS)N(z, css |]\}}|d|VqdS)=Nr).0kvrrr .sz#Creator.__repr__..)) __class__rjoin_args)rrrr__repr__-szCreator.__repr__cCs dt|jfd|jfd|jfgS)Nrrr)strrrr)rrrrr*0s z Creator._argscCsdS)aDetermine if we can create a virtual environment. :param interpreter: the interpreter in question :return: ``None`` if we can't create, any other object otherwise that will be forwarded to :meth:`add_parser_arguments` Tr)clsrrrr can_create7szCreator.can_createcCs>|jdd|jd|jdddddd |jd d dd dd d S)aAdd CLI arguments for the creator. :param parser: the CLI parser :param app_data: the application data folder :param interpreter: the interpreter we're asked to create virtual environment for :param meta: value as returned by :meth:`can_create` rz!directory to create virtualenv at)helptypez--clearr store_truezZremove the destination directory if exist before starting (will overwrite files otherwise)F)ractionr/defaultz--no-vcs-ignorerz>don't create VCS ignore directive in the destination directoryN) add_argument validate_dest)r-parserrmetarrrradd_parser_argumentsAs  zCreator.add_parser_argumentscCstdS)z)Perform the virtual environment creation.N)NotImplementedError)rrrrcreate^szCreator.createc Csdd}tj}t}|dkr&ddini}xXt|D]L}y*|j|f|j|}||krXw4t|Wq4tk r~d||<Yq4Xq4W|rdj|j}d|d |d |} t | t j |krd |d t j d } t | dt |} | j o| jr t d| dtjdkr(t t jj|} nt t jjt| j} | } x^| r| j rxt jt| t jrnPn || | | j| j} } | | kr|| | | } qFWt| S)zANo path separator in the path, valid chars and must be write-ablecSs6ttjj|j|jg}td|j|d|dS)Nzthe destination z is not write-able at )rospath commonprefixpartsr relative_to)rvaluecommonrrrnon_write_ablegsz-Creator.validate_dest..non_write_ablembcserrorsignoreNzthe file system codec (z) cannot handle characters z within z destination z& must not contain the path separator (r'z+ as this would break the activation scriptszthe destination z already exists and is a file)rGrH)sysgetfilesystemencodingrr,encodedecode ValueErrorr)keysrr;pathseprexistsis_file version_infor<realpathabspathresolveaccessW_OKparentname)r- raw_valuerBencodingZrefusedkwargscharZtripbadmsgr@rbase_rrrr5csH        zCreator.validate_destcCsJ|jjr(|jr(tjd|jt|j|j|j|jsF|j dS)Nz delete %s) rrPrloggingdebugr r: set_pyenv_cfgrsetup_ignore_vcs)rrrrruns z Creator.runcCsbt|j_tjjtjj|jj|jd<|jj |jd<dj dd|jj D|jd<t |jd<dS)Nhomeimplementation.css|]}t|VqdS)N)r,)r#irrrr&sz(Creator.set_pyenv_cfg..rR virtualenv) rrcontentr;r<dirnamerTrZsystem_executablerhr)rRr )rrrrrds  zCreator.set_pyenv_cfgcCs |jd}|js|jddS)z9Generate ignore instructions for version control systems.z .gitignorez(# created by virtualenv automatically * N)rrP write_text)rZ git_ignorerrrres zCreator.setup_ignore_vcscCs4|jdkr.|jdk r.t|j|j|j|j|_|jS)zt :return: debug information about the virtual environment (only valid after :meth:`create` has run) N)rZexeget_env_debug_info debug_scriptrr)rrrrrcsz Creator.debugcCstS)N) DEBUG_SCRIPTrrrrrpszCreator.debug_scriptN)rrr__doc__rr+r* classmethodr.r8rr:r5rfrdrepropertyrc staticmethodrprrrrrs   2  r) metaclassc Cs|j}|jdd|j|4}t|t|g}tjdt|t|\}}}WdQRXyR|dkr|rpt|}q|dkrd|krt |t |n t j |}|r||d<Wn.t k r} z|||t | dSd} ~ XnXd|kod |dkr|dd d=|S) N PYTHONPATHz debug via %rrfileerr)outrz returncode exceptionrIr<)copypopZensure_extractedr,rbrcrr rOSError Exceptionjsonloadsrepr) Zenv_exerprrcmdcoder{rzresultr}rrrros*      ro)#rrbr;rIabcrrargparserastr collectionsrpathlibrZ#virtualenv.discovery.cached_py_inforZvirtualenv.util.pathr Zvirtualenv.util.subprocessr Zvirtualenv.versionr rr r<rT__file__rXZHERErqrrro__all__rrrrs*         %