HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/pip/_internal/commands/__pycache__/download.cpython-310.pyc
o

@%NeN�@s�ddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZmZddl
mZddlmZdd	lmZmZmZdd
lmZe�e�ZGdd�de�ZdS)
�N)�Values)�List)�
cmdoptions)�make_target_python)�RequirementCommand�with_cleanup)�SUCCESS)�get_requirement_tracker)�
ensure_dir�normalize_path�write_output)�
TempDirectoryc@s<eZdZdZdZddd�Zededee	de
fd	d
��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> ...�returnNc
CsL|j�t���|j�t���|j�t���|j�t���|j�t���|j�t���|j�t�	��|j�t�
��|j�t���|j�t���|j�t�
��|j�t���|j�t���|j�t���|j�t���|jjddddddtjdd�t�|j�t�tj|j�}|j�d	|�|j�d	|j�dS)
Nz-dz--destz--destination-dirz--destination-directory�download_dir�dirzDownload packages into <dir>.)�dest�metavar�default�helpr)�cmd_opts�
add_optionr�constraints�requirements�no_deps�global_options�	no_binary�only_binary�
prefer_binary�src�pre�require_hashes�progress_bar�no_build_isolation�
use_pep517�
no_use_pep517�ignore_requires_python�os�curdir�add_target_python_options�make_option_group�index_group�parser�insert_option_group)�self�
index_opts�r0�A/usr/lib/python3/dist-packages/pip/_internal/commands/download.py�add_options%s@��zDownloadCommand.add_options�options�argsc
Cs(d|_g|_t�|�t|j�|_t|j�|�|�}t|�}|j	||||j
d�}|�t��}t
|jddd�}|�||||�}|j||||||jd|jd�}	|j|	|||j
|jd�}
|�|�|
j|dd�}g}|j��D]}
|
jdur�|
jdus|J�|	�|
�|�|
j�qn|r�td	d
�|��tS)NT)r3�session�
target_pythonr&�download)�delete�kind�globally_managedF)�temp_build_dirr3�req_trackerr5�finderr�
use_user_site�	verbosity)�preparerr=r3r&�py_version_info)�check_supported_wheelszSuccessfully downloaded %s� )�ignore_installed�	editablesr�check_dist_restrictionrrr
�get_default_sessionr�_build_package_finderr&�
enter_contextr	r
�no_clean�get_requirements�make_requirement_preparerr?�
make_resolver�python_version�trace_basic_info�resolver�values�satisfied_by�name�save_linked_requirement�appendr�joinr)r.r3r4r5r6r=r<�	directory�reqsr@�resolver�requirement_set�
downloaded�reqr0r0r1�runKsb


����


�zDownloadCommand.run)rN)�__name__�
__module__�__qualname__�__doc__�usager2rrr�str�intr]r0r0r0r1rs
& r)�loggingr'�optparser�typingr�pip._internal.clir�pip._internal.cli.cmdoptionsr�pip._internal.cli.req_commandrr�pip._internal.cli.status_codesr�pip._internal.req.req_trackerr	�pip._internal.utils.miscr
rr�pip._internal.utils.temp_dirr
�	getLoggerr^�loggerrr0r0r0r1�<module>s