File: D:/Python311/Lib/site-packages/pip/_internal/commands/__pycache__/download.cpython-311.pyc
�
�mi� � � � d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlm Z m
Z
d dlmZ d dl
mZ d dlmZmZmZ d d lmZ e j e� � Z G d
� de � � ZdS )� N)�Values)�
cmdoptions)�make_target_python)�RequirementCommand�with_cleanup)�SUCCESS)�get_build_tracker)�
ensure_dir�normalize_path�write_output)�
TempDirectoryc �N � e Zd ZdZdZd d�Zededee de
fd�� � 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
�X � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j
� � � � | j � t j � � � � | j � t j � � � � | j � t j
� � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � ddddddt$ j d�� � t j | j � � t j t j | j � � }| j � d |� � | j � d | 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�build_constraints�requirements�no_deps� no_binary�only_binary�
prefer_binary�src�pre�require_hashes�progress_bar�no_build_isolation�
use_pep517�check_build_deps�ignore_requires_python�os�curdir�add_target_python_options�make_option_group�index_group�parser�insert_option_group)�self�
index_optss �AD:\Python311\Lib\site-packages\pip/_internal/commands/download.py�add_optionszDownloadCommand.add_options$ sv � ��
� � ��!7�!9�!9�:�:�:��
� � ��!=�!?�!?�@�@�@��
� � ��!8�!:�!:�;�;�;��
� � ��!3�!5�!5�6�6�6��
� � ��!5�!7�!7�8�8�8��
� � ��!7�!9�!9�:�:�:��
� � ��!9�!;�!;�<�<�<��
� � ���!1�!1�2�2�2��
� � ���!1�!1�2�2�2��
� � ��!:�!<�!<�=�=�=��
� � ��!8�!:�!:�;�;�;��
� � ��!>�!@�!@�A�A�A��
� � ��!6�!8�!8�9�9�9��
� � ��!<�!>�!>�?�?�?��
� � ��!B�!D�!D�E�E�E��
� � ����%����I�0� !�
�
�
� �,�T�]�;�;�;��1��"��K�
�
�
�
��'�'��:�6�6�6���'�'��4�=�9�9�9�9�9� �options�argsc
�F � d|_ g |_ t j |� � t j |� � t |j � � |_ t |j � � | � |� � }t |� � }| �
||||j �� � }| � t � � � � }t |j dd�� � }| � ||||� � }| � ||||||j d| j �� � } | � | |||j |j �� � }
| � |� � |
� |d�� � }| � |j � � � � � g }|j � � � D ]A}
|
j �8|
j �J �| � |
� � |� |
j � � �B|r#t= d d
� |� � � � t@ S )NT)r5 �session�
target_pythonr( �download)�delete�kind�globally_managedF)�temp_build_dirr5 �
build_trackerr8 �finderr �
use_user_site� verbosity)�preparerr@ r5 r( �py_version_info)�check_supported_wheelszSuccessfully downloaded %s� )!�ignore_installed� editablesr �check_dist_restriction�check_build_constraintsr r r
�get_default_sessionr �_build_package_finderr( �
enter_contextr r
�no_clean�get_requirements�make_requirement_preparerrB �
make_resolver�python_version�trace_basic_info�resolve� prepare_linked_requirements_morer �values�satisfied_by�name�save_linked_requirement�appendr �joinr )r0 r5 r6 r8 r9 r@ r? � directory�reqsrC �resolver�requirement_set�
downloaded�reqs r2 �runzDownloadCommand.runJ sH � �#'�� � ����)�'�2�2�2��*�7�3�3�3�-�g�.B�C�C����7�'�(�(�(��*�*�7�3�3��*�7�3�3�
��+�+���'�#*�#A� ,�
�
�� �*�*�+<�+>�+>�?�?�
�!��'�'��!�
�
�
� � �$�$�T�7�F�G�D�D���1�1�$��'��� �-���n� 2�
�
�� �%�%����#*�#A�#�2� &�
�
��
���f�%�%�%�"�*�*�4��*�M�M���1�1�/�2N�2U�2U�2W�2W�X�X�X� "�
�"�/�6�6�8�8� ,� ,�C���
,��x�+�+�+��0�0��5�5�5��!�!�#�(�+�+�+��� M��5�s�x�x�
�7K�7K�L�L�L��r4 )r N)�__name__�
__module__�__qualname__�__doc__�usager3 r r �list�str�intrb � r4 r2 r r s| � � � � � �
�
�
0�E�$:� $:� $:� $:�L �C�6� C��c�� C�s� C� C� C� �\�C� C� Cr4 r )�loggingr) �optparser �pip._internal.clir �pip._internal.cli.cmdoptionsr �pip._internal.cli.req_commandr r �pip._internal.cli.status_codesr �,pip._internal.operations.build.build_trackerr �pip._internal.utils.miscr
r r �pip._internal.utils.temp_dirr
� getLoggerrc �loggerr rk r4 r2 �<module>rw s
�� ���� � � � � � � � � � � (� (� (� (� (� (� ;� ;� ;� ;� ;� ;� J� J� J� J� J� J� J� J� 2� 2� 2� 2� 2� 2� J� J� J� J� J� J� M� M� M� M� M� M� M� M� M� M� 6� 6� 6� 6� 6� 6� �� �8� $� $��~� ~� ~� ~� ~�(� ~� ~� ~� ~� ~r4