Ñò
œèRc           @   sÞ   d  d k  Z  d  d k Z d  d k Z d  d k Z d  d k l Z l Z l Z d  d k l	 Z	 d  d k
 l Z l Z l Z d  d k l Z d  d k l Z d  d k l Z l Z l Z d  d k l Z d	 e f d
 „  ƒ  YZ d S(   iÿÿÿÿN(   t   InstallRequirementt   RequirementSett   parse_requirements(   t   logger(   t
   src_prefixt   virtualenv_no_globalt   distutils_scheme(   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(   sª  
    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.

    See http://www.pip-installer.org for details on VCS url formats and
    requirements files.
    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   s¹  t  t |  ƒ i | | Ž  |  i } | i d d d d d d d g  d d	 d
 d ƒ| i t i ƒ | i t i ƒ | i d d d d d d d d  d
 d ƒ| i d d d d d d d d d d  d
 d ƒ| i t i	 ƒ | i d d d d d d d d d t
 d
 d ƒ| i d d d d d d  d
 d! ƒ| i d" d d# d d  d
 d$ ƒ| i d% d& d d' d d  d
 d( ƒ| i t i ƒ | i d) d d* d d  d
 d+ ƒ| i d, d d- d d  d
 d. ƒ| i t i ƒ | i t i ƒ | i d/ d d0 d d  d
 d1 ƒ| i d2 d d3 d d  d
 d4 ƒ| i d5 d d6 d d d d  d
 d7 ƒ| i t i ƒ | i d8 d d  d t d
 d9 ƒ| i t i ƒ t i t i |  i ƒ } |  i i d: | ƒ |  i i d: | ƒ d  S(;   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_installsB   Download and unpack all packages, but don't actually install them.s   --no-downloadt   no_downloadss   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 as self contained egg file, like easy_install does.s   --roott	   root_paths=   Install everything relative to this alternate root directory.s   --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	   build_dirt   Nonet   download_cacheR   t   no_depst   install_optionst   global_optionst	   use_wheelt   Falset   no_cleant   make_option_groupt   index_groupt   parsert   insert_option_group(   t   selft   argst   kwR%   t
   index_opts(    (    sP   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/install.pyR$   )   s¨    					c         C   s^   t  d | i d | d | i d | i d | i d | i d | i d | i d	 | i d
 | i	 ƒ 
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_urlst   use_mirrorst   mirrorsR.   t   allow_externalt   allow_insecuret   allow_all_externalt   allow_all_insecuret   allow_all_prereleases(
   R   R9   R;   R<   R.   R=   R>   R?   R@   t   pre(   R5   t   optionsR:   (    (    sP   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/install.pyt   _build_package_finderš   s    							c         C   s=  | i  o t | _ t | _ n t i i | i ƒ | _ t i i | i ƒ | _ | i	 p g  } | i
 o+ t ƒ  o t d ƒ ‚ n | i d ƒ n d  } | i o t | _ t i ƒ  } t i i | i ƒ | _ t i i | i ƒ o' t i i | i ƒ o t d ƒ ‚ n | i d | ƒ n | i p g  } | i g | i } | i o$ t i d d i | ƒ ƒ g  } n |  i | | ƒ } t d | i d | i d	 | i  d
 | i d | i d | i  d | i d | i! d | i" d | i
 d | ƒ } x' | D] }	 | i# t$ i% |	 d  ƒ ƒ q÷Wx0 | i& D]% }	 | i# t$ i' |	 d | i( ƒƒ q$WxA | i) D]6 }
 x- t* |
 d | d | ƒD] } | i# | ƒ qvWqWW| i+ p\ h |  i, d 6} | i- o& d t. | d d i | i- ƒ ƒ} n d | } t i/ | ƒ d  SzayF| i0 p# | i1 | d |  i2 d |  i2 ƒn | i3 ƒ  | i ot |  i2 oi | i4 | | d | i5 ƒd i g  } | i6 D] } | | i, qw~ ƒ } | o t i d | ƒ q?n |  i2 pP d i g  } | i7 D] } | | i, qÑ~ ƒ } | o t i d | ƒ q?n3 |  i2 o( | i8 |  i9 ƒ t i d |  i9 ƒ n Wn t: j
 o d  SXWd  | i; o, | i p
 | i  o | i< d |  i2 ƒ n X| i oœ t i i | i ƒ p t i= | i ƒ n t> d  d! | ƒd" } xH t i? | ƒ D]7 } t@ iA t i i | | ƒ t i i | i | ƒ ƒ qíWt@ iB | ƒ n | S(#   NsZ   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   ,R(   R   R   R*   R   R!   R   t   ignore_dependenciesR   R    R   t   default_vcst   finderRC   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(C   R   t   TrueR   R   t   ost   patht   abspathR(   R   R,   R    R   R	   R   R)   R   t   tempfilet   mkdtempt   existst   isdirR
   R-   t	   index_urlt   extra_index_urlst   no_indexR   t   notifyt   joinRD   R   R*   R   R!   RF   R   t   add_requirementR    t	   from_lineR   t   from_editableRG   R'   R   t   has_requirementsRI   R9   t   dictt   warnR   t   prepare_filesRM   t   locate_filesR   R"   t   successfully_installedt   successfully_downloadedt   create_bundlet   bundle_filenameR   R0   t   cleanup_filest   makedirsR   t   listdirt   shutilt   movet   rmtree(   R5   RC   R6   R,   t   temp_target_dirR-   R:   RH   t   requirement_setRI   t   filenamet   reqt   optst   msgt   _[1]t	   installedt   _[2]t
   downloadedt   lib_dirt   item(    (    sP   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/install.pyt   run¬   s¸    
	


	-

											 
 
  

# 
#
#
#

 
 (   t   __name__t
   __module__t   __doc__RI   t   usaget   summaryR/   RM   R$   RD   R}   (    (    (    sP   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/install.pyR      s   	q	(   RS   t   sysRV   Rn   t   pip.reqR    R   R   t   pip.logR   t   pip.locationsR   R   R   t   pip.basecommandR   t	   pip.indexR   t   pip.exceptionsR	   R
   R   t   pipR   R   (    (    (    sP   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/commands/install.pyt   <module>   s   