관리-도구
편집 파일: download.cpython-36.pyc
3 �Re6 � @ s� d dl mZ d dlZd dlZd dlmZ d dlmZ d dlm Z m Z d dlmZ d dl mZ d dlmZmZmZ d d lmZ d d lmZ er�d dlmZ d dlmZ eje�ZG d d� de �ZdS )� )�absolute_importN)� cmdoptions)�make_target_python)�RequirementCommand�with_cleanup)�SUCCESS)�get_requirement_tracker)� ensure_dir�normalize_path�write_output)� TempDirectory)�MYPY_CHECK_RUNNING)�Values)�Listc @ s( e Zd ZdZdZdd� Zedd� �ZdS )�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 C sL | j jtj� � | j jtj� � | j jtj� � | j jtj� � | j jtj� � | j jtj� � | j jtj � � | j jtj � � | j jtj� � | j jtj� � | j jtj � � | j jtj� � | j jtj� � | j jtj� � | j jtj� � | j jddddddtjdd� tj| j � tjtj| j�}| jjd |� | jjd | j � d S ) Nz-dz--destz--destination-dirz--destination-directory�download_dir�dirzDownload packages into <dir>.)�dest�metavar�default�helpr )�cmd_opts� add_optionr �constraints�requirements� build_dir�no_deps�global_options� no_binary�only_binary� prefer_binary�src�pre�require_hashes�progress_bar�no_build_isolation� use_pep517� no_use_pep517�os�curdir�add_target_python_options�make_option_group�index_group�parser�insert_option_group)�self� index_opts� r1 ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/download.py�add_options* s6 zDownloadCommand.add_optionsc C s� d|_ g |_tj|� t|j�|_t|j� | j|�}t|�}| j |||d�}|j pX|j }| jt � �}t|j|ddd�}| j||||�} | j||||||jdd�} | j| |||jd�}| j|� |j| dd�}d jd d� |jj� D ��} | r�td| � tS ) NT)�options�session� target_python�download)�delete�kind�globally_managedF)�temp_build_dirr4 �req_trackerr5 �finderr � use_user_site)�preparerr= r4 �py_version_info)�check_supported_wheels� c S s g | ]}|j r|j�qS r1 )�successfully_downloaded�name)�.0�reqr1 r1 r2 � <listcomp>� s z'DownloadCommand.run.<locals>.<listcomp>zSuccessfully downloaded %s)�ignore_installed� editablesr �check_dist_restrictionr r r �get_default_sessionr �_build_package_finder�no_cleanr � enter_contextr r �get_requirements�make_requirement_preparer� make_resolver�python_version�trace_basic_info�resolve�joinr �valuesr r )r/ r4 �argsr5 r6 r= �build_deleter<