ó
^\kdc           @   sä   d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l m Z m Z m Z d  d l m	 Z	 d  d l
 m Z m Z m Z 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 d	 e f d
 „  ƒ  YZ d S(   iÿÿÿÿN(   t   InstallRequirementt   RequirementSett   parse_requirements(   t   logger(   t
   src_prefixt   virtualenv_no_globalt   distutils_schemet   build_prefix(   t   Command(   t   PackageFinder(   t   InstallationErrort   CommandErrort   PreviousBuildDirError(   t
   cmdoptionst   InstallCommandc           B   sA   e  Z d  Z d Z d Z d Z e Z d „  Z d „  Z	 d „  Z
 RS(   sI  
    Install packages from:

    - PyPI (and other indexes) using requirement specifiers.
    - VCS project urls.
    - Local project directories.
    - Local or remote source archives.

    pip also supports installing from "requirements files", which provide
    an easy way to specify a whole environment to be installed.
    t   installsõ   
      %prog [options] <requirement specifier> ...
      %prog [options] -r <requirements file> ...
      %prog [options] [-e] <vcs project url> ...
      %prog [options] [-e] <local project path> ...
      %prog [options] <archive url/path> ...s   Install packages.c         O   sC  t  t |  ƒ j | | Ž  |  j } | j d d d d d d d g  d d	 d
 d ƒ| j t j j ƒ  ƒ | j t j j ƒ  ƒ | j d d d d d d d d  d
 d ƒ| j d d d d d d d d d d  d
 d ƒ| j t j
 j ƒ  ƒ | j d d d d d d d d d t d
 d ƒ| j d d d d d d  d
 d! ƒ| j d" d d# d d  d
 d$ ƒ| j d% d& d d' d d  d
 d( ƒ| j t j j ƒ  ƒ | j d) d d* d d  d
 d+ ƒ| j d, d d- d d  d
 d. ƒ| j t j j ƒ  ƒ | j t j j ƒ  ƒ | j d/ d d0 d d  d
 d1 ƒ| j d2 d d3 d d  d
 d4 ƒ| j d5 d d6 d d d d  d
 d7 ƒ| j d8 d d  d d9 d t d
 d: ƒ| j d; d d< d d9 d
 d= ƒ| j t j j ƒ  ƒ | j t j j ƒ  ƒ | j d> d d  d t d
 d? ƒ| j t j j ƒ  ƒ t j t j |  j ƒ } |  j j d@ | ƒ |  j j d@ | ƒ d  S(A   Ns   -es
   --editablet   destt	   editablest   actiont   appendt   defaultt   metavars   path/urlt   helpsk   Install a project in editable mode (i.e. setuptools "develop mode") from a local project path or a VCS url.s   -ts   --targett
   target_dirt   dirs   Install packages into <dir>.s   -ds
   --downloads   --download-dirs   --download-directoryt   download_dirs`   Download packages into <dir> instead of installing them, regardless of what's already installed.s   --srcs   --sources   --source-dirs   --source-directoryt   src_dirs˜   Directory to check out editable projects into. The default in a virtualenv is "<venv path>/src". The default for global installs is "<current dir>/src".s   -Us	   --upgradet   upgradet
   store_truesˆ   Upgrade all packages to the newest available version. This process is recursive regardless of whether a dependency is already satisfied.s   --force-reinstallt   force_reinstallsK   When upgrading, reinstall all packages even if they are already up-to-date.s   -Is   --ignore-installedt   ignore_installeds5   Ignore the installed packages (reinstalling instead).s   --no-installt
   no_installsN   DEPRECATED. Download and unpack all packages, but don't actually install them.s   --no-downloadt   no_downloads   DEPRECATED. Don't download any packages, just install the ones already downloaded (completes an install run with --no-install).s   --usert   use_user_sites   Install using the user scheme.s   --eggt   as_eggsâ   Install packages as eggs, not 'flat', like pip normally does. This option is not about installing *from* eggs. (WARNING: Because this option overrides pip's normal install logic, requirements files may not behave as expected.)s   --roott	   root_paths=   Install everything relative to this alternate root directory.s	   --compilet   compiles   Compile py files to pycs   --no-compilet   store_falses   Do not compile py files to pycs   --presY   Include pre-release and development versions. By default, pip only finds stable versions.i    (   t   superR   t   __init__t   cmd_optst
   add_optionR   t   requirementst   maket	   build_dirt   Nonet   download_cacheR   t   no_depst   install_optionst   global_optionst   Truet	   use_wheelt   no_use_wheelt   Falset   no_cleant   make_option_groupt   index_groupt   parsert   insert_option_group(   t   selft   argst   kwR(   t
   index_opts(    (    s;   /var/www/testScraper/venv/build/pip/pip/commands/install.pyR'   '   sÀ    					c         C   sR   t  d | j d | d | j d | j d | j d | j d | j d | j d	 | ƒ 	S(
   s¨   
        Create a package finder appropriate to this install command.
        This method is meant to be overridden by subclasses, not
        called directly.
        t
   find_linkst
   index_urlsR3   t   allow_externalt   allow_unverifiedt   allow_all_externalt   allow_all_prereleasest   process_dependency_linkst   session(   R	   R?   R3   RA   RB   RC   t   preRE   (   R;   t   optionsR@   RF   (    (    s;   /var/www/testScraper/venv/build/pip/pip/commands/install.pyt   _build_package_finder¨   s    						c      !   C   s·  | j  s* | j s* | j t k s* | j r= t j d d ƒ n  | j r[ t | _  t | _	 n  t
 j j | j ƒ | _ t
 j j | j ƒ | _ | j p— g  } | j rË t ƒ  r» t d ƒ ‚ n  | j d ƒ n  d  } | j rUt | _	 t j ƒ  } t
 j j | j ƒ | _ t
 j j | j ƒ rAt
 j j | j ƒ rAt d ƒ ‚ n  | j d | ƒ n  | j pag  } | j g | j } | j r£t j d d j | ƒ ƒ g  } n  | j  r¿t j d d	 ƒ n  | j! rèt j d d
 ƒ | | j! 7} n  |  j" | ƒ } |  j# | | | ƒ } t$ d | j d | j d | j d | j% d | j& d | j' d | j	 d | j( d | j) d | j d | d | d | j* ƒ }	 x' | D] }
 |	 j+ t, j- |
 d  ƒ ƒ q‹Wx0 | j. D]% }
 |	 j+ t, j/ |
 d | j0 ƒƒ q¸WxG | j1 D]< } x3 t2 | d | d | d | ƒD] } |	 j+ | ƒ qWqëW|	 j3 s�i |  j4 d 6} | j5 rrd t6 | d d j | j5 ƒ ƒ} n
 d | } t j7 | ƒ d  SzMy)| j s¾|	 j8 | d  |  j9 d! |  j9 ƒn
 |	 j: ƒ  | j  r:|  j9 r:|	 j; | | d" | j< ƒd j g  |	 j= D] } | j4 ^ qƒ } | r¸t j d# | ƒ q¸n~ |  j9 sˆd j g  |	 j> D] } | j4 ^ qSƒ } | r¸t j d$ | ƒ q¸n0 |  j9 r¸|	 j? |  j@ ƒ t j d% |  j@ ƒ n  Wn tA k
 rØt | _ ‚  n XWd  | j r| j  sú| j r|	 jB d! |  j9 ƒ n  X| j r³t
 j j | j ƒ sBt
 jC | j ƒ n  tD d& d' | ƒd( } xH t
 jE | ƒ D]7 } tF jG t
 j j | | ƒ t
 j j | j | ƒ ƒ qhWtF jH | ƒ n  |	 S()   Ns   1.7s~   DEPRECATION: --no-install, --no-download, --build, and --no-clean are deprecated.  See https://github.com/pypa/pip/issues/906.sZ   Can not perform a '--user' install. User site-packages are not visible in this virtualenv.s   --users=   Target path exists but is not a directory, will not continue.s   --home=s   Ignoring indexes: %st   ,sˆ   --use-mirrors has been deprecated and will be removed in the future. Explicit uses of --index-url and/or --extra-index-url is suggested.s…   --mirrors has been deprecated and will be removed in  the future. Explicit uses of --index-url and/or --extra-index-url is suggested.R,   R   R   R.   R   R"   R   t   ignore_dependenciesR   R!   R   RF   t	   pycompilet   default_vcst   finderRH   t   names^   You must give at least one requirement to %(name)s (maybe you meant "pip %(name)s %(links)s"?)t   linkst    sL   You must give at least one requirement to %(name)s (see "pip help %(name)s")t   force_root_egg_infot   bundlet   roots   Successfully installed %ss   Successfully downloaded %ss   Created bundle in %st    t   homet   purelib(I   R   R    R,   R   R6   R   t
   deprecatedR   R2   R   t   ost   patht   abspathR   R0   R!   R   R
   R   R-   R   t   tempfilet   mkdtempt   existst   isdirR   R1   t	   index_urlt   extra_index_urlst   no_indext   notifyt   joint   use_mirrorst   mirrorst   _build_sessionRI   R   R.   R   R"   RK   R   R$   t   add_requirementR    t	   from_lineR   t   from_editableRM   R*   R   t   has_requirementsRO   R?   t   dictt   warnt   prepare_filesRS   t   locate_filesR   R#   t   successfully_installedt   successfully_downloadedt   create_bundlet   bundle_filenameR   t   cleanup_filest   makedirsR   t   listdirt   shutilt   movet   rmtree(   R;   RH   R<   R0   t   temp_target_dirR1   R@   RF   RN   t   requirement_setRO   t   filenamet   reqt   optst   msgt	   installedt
   downloadedt   lib_dirt   item(    (    s;   /var/www/testScraper/venv/build/pip/pip/commands/install.pyt   runº   sÎ    									+				
												%		" 	"
						(   t   __name__t
   __module__t   __doc__RO   t   usaget   summaryR5   RS   R'   RI   R„   (    (    (    s;   /var/www/testScraper/venv/build/pip/pip/commands/install.pyR      s   	�	(   RY   t   sysR\   Rw   t   pip.reqR    R   R   t   pip.logR   t   pip.locationsR   R   R   R   t   pip.basecommandR   t	   pip.indexR	   t   pip.exceptionsR
   R   R   t   pipR   R   (    (    (    s;   /var/www/testScraper/venv/build/pip/pip/commands/install.pyt   <module>   s   "