관리-도구
편집 파일: base_embed.cpython-37.pyc
B ���aV � @ s| d dl mZmZ d dlmZ d dlmZ d dlmZ d dl m Z mZ ddlm Z ddlmZ d Zee�G d d� de ��ZdS ) � )�absolute_import�unicode_literals)�ABCMeta)� add_metaclass)�Path)� ensure_str�ensure_text� )�Seeder)�VersionTc sL e Zd Z� fdd�Zedd� �Zdd� Zedd� �Zd d � Zdd� Z � Z S ) � BaseEmbedc s� t t| �j||jdkd� |j| _dd� |jD �| _|j| _|j| _ |j | _|j| _|j | _ |j| _|j| _|j | _| �� s�d| _d S )NF)�enabledc S s g | ]}|� � r|�� �qS � )�exists�resolve)�.0�ir r �Q/opt/alt/python37/lib/python3.7/site-packages/virtualenv/seed/embed/base_embed.py� <listcomp> s z&BaseEmbed.__init__.<locals>.<listcomp>)�superr �__init__Zno_seed�download�extra_search_dir�pipZpip_version� setuptoolsZsetuptools_version�wheel� wheel_versionZno_pipZ no_setuptoolsZno_wheel�app_data�no_periodic_updateZperiodic_update�distribution_to_versionsr )�self�options)� __class__r r r s zBaseEmbed.__init__c C s t jt jt jd�S )N)r r r )r Zbundle)�clsr r r � distributions% s zBaseEmbed.distributionsc s � fdd�� � � D �S )Nc s2 i | ]*}t � d �|��dkrt � d�|��|�qS )zno_{}Fz {}_version)�getattr�format)r �distribution)r r r � <dictcomp>. s z6BaseEmbed.distribution_to_versions.<locals>.<dictcomp>)r$ )r r )r r r - s z"BaseEmbed.distribution_to_versionsc C s� |� � }|jddddd�d�| �� ��dd� |jd dd d�d�| �� ��dd� |jd dtddg d� x8| �� �� D ](\}}|jd�|�|dd�|�|d� qvW x6| �� D ]*}|jd�|�d�|�d d�|�dd� q�W |jddd dt d� d S )Nz --no-downloadz--never-downloadr Zstore_falsez3pass to disable download of the latest {} from PyPI�/T)�dest�action�help�defaultz --download� store_truez2pass to enable download of the latest {} from PyPIFz--extra-search-dir�d�+zPa path containing wheels to extend the internal wheel list (can be set 1+ times))�metavar�type�nargsr, r- z--{}�versionz@version of {} to install as seed: embed, bundle or exact version)r* r1 r, r- z--no-{}zno_{}zdo not install {}z--no-periodic-updater zGdisable the periodic (once every 14 days) update of the embedded wheels)�add_mutually_exclusive_group�add_argumentr&