/usr/local/lib/python3.6/site-packages/virtualenv/create/__pycache__
Edit: /usr/local/lib/python3.6/site-packages/virtualenv/create/__pycache__/creator.cpython-36.pyc (7478B)
3
0Dg @ s d dl Z d dlZd dlZd dlZd dlmZmZ d dlmZ d dl m
Z
d dlmZ d dl
mZ d dlmZ d dlmZ d d lmZ d d
lmZ ddlmZ eejjejZed
ZG dd dZG dd dedZ dd Z!ddgZ"dS ) N)ABCMetaabstractmethod)ArgumentTypeError)literal_eval)OrderedDict)Path)LogCmd)safe_delete)run_cmd)__version__ )PyEnvCfgzdebug.pyc @ s e Zd Zdd ZdS )CreatorMetac C s
d | _ d S )N)error)self r C/usr/local/lib/python3.6/site-packages/virtualenv/create/creator.py__init__ s zCreatorMeta.__init__N)__name__
__module____qualname__r r r r r r s r c @ s e Zd ZdZdd Zdd Zdd Zedd Zed
d Z e
dd
Zedd Zdd Z
dd Zdd Zedd Zedd ZdS )CreatorzEA class that given a python Interpreter creates a virtual environmentc C sJ || _ 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_debugr destclear
no_vcs_ignorer
Zfrom_folder pyenv_cfgapp_dataenv)r optionsr r r r r s zCreator.__init__c C s( | j j ddjdd | j D dS )N(z, c s s | ]\}}| d | V qdS )=Nr ).0kvr r r
. s z#Creator.__repr__..)) __class__r join_args)r r r r __repr__- s zCreator.__repr__c C s dt | jfd| jfd| jfgS )Nr r r )strr r r )r r r r r* 0 s z
Creator._argsc C s dS )a Determine 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 )clsr r r r
can_create7 s zCreator.can_createc C s> |j dd| jd |j dddddd |j d
ddddd d
S )a Add 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`
r z!directory to create virtualenv at)helptypez--clearr
store_truezZremove the destination directory if exist before starting (will overwrite files otherwise)F)r actionr/ defaultz--no-vcs-ignorer z>don't create VCS ignore directive in the destination directoryN)add_argument
validate_dest)r- parserr metar r r r add_parser_argumentsA s
zCreator.add_parser_argumentsc C s t dS )z)Perform the virtual environment creation.N)NotImplementedError)r r r r create^ s zCreator.createc C s dd }t j }t }|dkr&ddini }xXt|D ]L}y*|j|f|j|}||krXw4t|W q4 tk
r~ d||<