OwlCyberSecurity - MANAGER
Edit File: download.cpython-38.pyc
U �J)^� � @ s� d dl mZ d dlZd dlZd dlmZ d dlmZ d dlm Z d dl mZ d dlm Z d dlmZmZmZ d d lmZ e�e�ZG d d� de �ZdS )� )�absolute_importN)� cmdoptions)�make_target_python)�RequirementCommand)�RequirementSet)�get_requirement_tracker)� ensure_dir�normalize_path�write_output)� TempDirectoryc s, e Zd ZdZdZ� fdd�Zdd� Z� ZS )�DownloadCommandaL Download packages from: - PyPI (and other indexes) using requirement specifiers. - VCS project urls. - Local project directories. - Local or remote source archives. pip also supports downloading from "requirements files", which provide an easy way to specify a whole environment to be downloaded. a %prog [options] <requirement specifier> [package-index-options] ... %prog [options] -r <requirements file> [package-index-options] ... %prog [options] <vcs project url> ... %prog [options] <local project path> ... %prog [options] <archive url/path> ...c sN t t| �j||� | j}|�t�� � |�t�� � |�t�� � |�t� � � |�t� � � |�t�� � |�t�� � |�t� � � |�t�� � |�t�� � |�t�� � |�t�� � |�t�� � |�t�� � |�t�� � |�t�� � |jddddddtjdd� t�|� t�tj| j�}| j�d |� | j�d |� d S ) Nz-dz--destz--destination-dirz--destination-directory�download_dir�dirzDownload packages into <dir>.)�dest�metavar�default�helpr )�superr �__init__�cmd_optsZ add_optionr ZconstraintsZrequirements� build_dirZno_depsZglobal_optionsZ no_binaryZonly_binaryZ prefer_binary�srcZpre�no_cleanZrequire_hashesZprogress_barZno_build_isolationZ use_pep517Z no_use_pep517�os�curdirZadd_target_python_optionsZmake_option_groupZindex_group�parserZinsert_option_group)�self�args�kwr Z index_opts�� __class__� �A/usr/lib/python3/dist-packages/pip/_internal/commands/download.pyr ( sF � �zDownloadCommand.__init__c C s d|_ g |_t�|� t|j�|_t|j� | �|�}t|�}| j |||d�}|j pX|j }t� ��}t |j|dd���}t� } | �| ||||d � | j||||||jdd�} | j| |||jd�}| �|� |�| � d�d d � | jD ��}|r�td|� |j �s| �� W 5 Q R X W 5 Q R X | S )NT)�options�session� target_pythonZdownload)�deleteZkindF)Ztemp_build_dirr# �req_trackerr$ �finderr Z use_user_site)�preparerr( r# Zpy_version_info� c S s g | ] }|j �qS r! )�name)�.0Zreqr! r! r"