£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>
U
    .e                     @   s   d dl mZ d dlZd dlZd dlmZ d dlmZ d dlm	Z	 d dl
mZ d dlmZ d dlmZ d d	lmZmZmZ d d
lmZ eeZG dd de	ZdS )    )absolute_importN)
cmdoptions)make_target_python)RequirementCommand)RequirementSet)RequirementTracker)check_path_owner)
ensure_dirnormalize_pathwrite_output)TempDirectoryc                       s,   e Zd ZdZdZ fddZdd Z  ZS )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  |jddddddtjdd t| ttj| j}| jd	| | jd	| d S )
Nz-dz--destz--destination-dirz--destination-directorydownload_dirdirzDownload packages into <dir>.)destmetavardefaulthelpr   )superr   __init__cmd_optsZ
add_optionr   ZconstraintsZrequirements	build_dirZno_depsZglobal_optionsZ	no_binaryZonly_binaryZprefer_binarysrcZpreno_cleanrequire_hashesZprogress_barZno_build_isolationZ
use_pep517Zno_use_pep517oscurdirZadd_target_python_optionsZmake_option_groupZindex_groupparserZinsert_option_group)selfargskwr   Z
index_opts	__class__ C/usr/lib/python3.8/site-packages/pip/_internal/commands/download.pyr   )   sF       
zDownloadCommand.__init__c              
   C   sL  d|_ g |_t| tj|j|_t|j	|_	t
|j	 | |}t|}| j|||d}|jph|j }|jrt|jstd|j d |_t }t|j|dd}t|jd}	| |	||||d  | j||||j	d}
| j|
||||jd}||	 d	d
d |	jD }|r$td| |js4|	   W 5 Q R X W 5 Q R X |	S )NT)optionssessiontarget_pythonzThe directory '%s' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.Zdownload)deleteZkind)r   )Ztemp_build_dirr%   req_trackerr   )preparerfinderr&   r%   Zpy_version_info c                 S   s   g | ]
}|j qS r#   )name).0Zreqr#   r#   r$   
<listcomp>   s    z'DownloadCommand.run.<locals>.<listcomp>zSuccessfully downloaded %s)!Zignore_installedZ	editablesr   Zcheck_dist_restrictionr   pathabspathZsrc_dirr
   r   r	   Zget_default_sessionr   Z_build_package_finderr   r   	cache_dirr   loggerZwarningr   r   r   r   Zpopulate_requirement_setZmake_requirement_preparerZmake_resolverZpython_versionZresolvejoinZsuccessfully_downloadedr   Zcleanup_files)r   r%   r   r&   r'   r+   Zbuild_deleter)   Z	directoryZrequirement_setr*   ZresolverZ
downloadedr#   r#   r$   runQ   sv    



  	


zDownloadCommand.run)__name__
__module____qualname____doc__Zusager   r5   __classcell__r#   r#   r!   r$   r      s   (r   )Z
__future__r   Zloggingr   Zpip._internal.clir   Zpip._internal.cli.cmdoptionsr   Zpip._internal.cli.req_commandr   Zpip._internal.reqr   Zpip._internal.req.req_trackerr   Zpip._internal.utils.filesystemr   Zpip._internal.utils.miscr	   r
   r   Zpip._internal.utils.temp_dirr   Z	getLoggerr6   r3   r   r#   r#   r#   r$   <module>   s   
