
_Tc           @   s  d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l m Z m	 Z	 d  d l
 m Z m Z m Z d  d l m Z d  d l m Z d  d l m Z m Z d  d l m Z m Z m Z d  d l m Z m Z m Z d  d	 l 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$ m% Z% m& Z& m' Z' m( Z( m) Z) m* Z* m+ Z+ d  d l, m- Z- d  d l m. Z. d  d l/ m0 Z0 m1 Z1 m2 Z2 m3 Z3 m4 Z4 m5 Z5 m6 Z6 m7 Z7 m8 Z8 m9 Z9 d Z: d e; f d     YZ< d Z= d e; f d     YZ> d e; f d     YZ? d   Z@ d   ZA e jB d e jC  ZD eE eE eE d  ZF eE d  ZG d e; f d     YZH d e; f d      YZI d! e; f d"     YZJ d S(#   iN(   t   bin_pyt   running_under_virtualenv(   t   InstallationErrort   UninstallationErrort   BestVersionAlreadyInstalled(   t   vcs(   t   logger(   t   display_patht   rmtree(   t   askt   ask_path_existst
   backup_dir(   t   is_installable_dirt   is_localt   dist_is_local(   t   renamest   normalize_patht   egg_link_path(   t   make_path_relative(   t   call_subprocess(
   t   anyt   copytreet   urlparset   urllibt   ConfigParsert   string_typest	   HTTPErrort
   FeedParsert   get_python_versiont   b(   t   Link(   t   build_prefix(
   t   get_file_contentt   is_urlt   url_to_patht   path_to_urlt   is_archive_filet   unpack_vcs_linkt
   is_vcs_urlt   is_file_urlt   unpack_file_urlt   unpack_http_urls   pip-delete-this-directory.txtt   InstallRequirementc           B   s  e  Z d% e d% e d   Z e d% d% d   Z e d% d   Z d   Z	 d   Z
 e d  Z d   Z e d    Z e d    Z e d	    Z e d
  Z d Z d   Z d   Z d   Z d   Z e d    Z e j d  Z d& d  Z e d    Z e d    Z d   Z e d  Z e d  Z  d   Z! d   Z" d   Z# d   Z$ d' d  Z% d   Z& d( d  Z' d   Z( d    Z) e d!    Z* d"   Z+ d#   Z, e d$    Z- RS()   c         C   s   d |  _  t | t  r9 t j j |  } | j  |  _  n  | |  _ | |  _ | |  _ | |  _	 | |  _
 d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ | |  _ d  |  _ d  |  _ d  S(   N(    (   t   extrast
   isinstanceR   t   pkg_resourcest   Requirementt   parset   reqt
   comes_fromt
   source_dirt   editablet   urlt   Nonet   _egg_info_patht   satisfied_byt   conflicts_witht   _temp_build_dirt
   _is_bundlet   updatet   install_succeededt   uninstalled(   t   selfR0   R1   R2   R3   R4   R;   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   __init__$   s"    													c      	   C   sX   t  | |  \ } } | j d  r3 t |  } n d  } |  | | d | d t d | S(   Ns   file:R2   R3   R4   (   t   parse_editablet
   startswithR"   R5   t   True(   t   clst   editable_reqR1   t   default_vcst   nameR4   R2   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   from_editable?   s
    c      	   C   s  d } | j   } d } t j j t j j |   } d } t |  rW t |  } n t j j |  r t j j	 | k s | j
 d  r t |  s t d |   n  t t |   } nF t |  rt j j |  s t j d |  n  t t |   } n  | ru| d k ru| j } | j } | j d k r{t j d |  r{t t j j t j j | j    } q{n | } |  | | d | S(   s   Creates an InstallRequirement from a name, which might be a
        requirement, directory containing 'setup.py', filename, or URL.
        t   .s;   Directory %r is not installable. File 'setup.py' not found.sA   Requirement %r looks like a filename, but the file does not existt   files   \.\./R4   N(   R5   t   stript   ost   patht   normpatht   abspathR!   R   t   isdirt   sepRA   R   R   R#   R$   t   isfileR   t   warnt   url_fragmentt   egg_fragmentt   schemet   ret   search(   RC   RF   R1   R4   R0   RL   t   link(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt	   from_lineH   s,    3		!-c         C   s   |  j  r8 t |  j   } |  j rA | d |  j 7} qA n	 |  j } |  j d  k	 rm | d t |  j j  7} n  |  j r t |  j t	  r |  j } n |  j j
   } | r | d | 7} q n  | S(   Ns    from %ss    in %ss
    (from %s)(   R0   t   strR4   R7   R5   R   t   locationR1   R,   R   t	   from_path(   R>   t   sR1   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   __str__m   s    				c         C   sv   |  j  d  k r d  St |  j   } |  j rr t |  j t  rI |  j } n |  j j   } | rr | d | 7} qr n  | S(   Ns   ->(   R0   R5   RZ   R1   R,   R   R\   (   R>   R]   R1   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR\      s    	c         C   s   |  j  d  k	 r |  j  S|  j d  k rJ t j d d  |  _  | |  _ |  j  S|  j re |  j j   } n	 |  j } t	 j
 j |  s t |  n  t	 j
 j | |  S(   Ns   -builds   pip-(   R9   R5   R0   t   tempfilet   mkdtempt   _ideal_build_dirR3   RF   t   lowerRK   RL   t   existst   _make_build_dirt   join(   R>   t	   build_dirt   unpackRF   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   build_location   s    			c         C   s8  |  j  d k	 r d S|  j d k	 s( t  |  j s7 t  |  j } |  j } |  ` |  j rj |  j j   } n	 |  j } t	 j
 j | |  } t	 j
 j |  s t j d |  t |  n  t	 j
 j |  r t d t |    n  t j d |  t |  t |  f  t j | |  | |  _ | |  _  d |  _ d S(   sk   If the build location was a temporary directory, this will move it
        to a new more permanent locationNs   Creating directory %ss<   A package already exists in %s; please remove it to continues,   Moving package %s from %s to new location %s(   R2   R5   R0   t   AssertionErrorR9   Ra   R3   RF   Rb   RK   RL   Re   Rc   R   t   debugRd   R   R   t   shutilt   moveR6   (   R>   t   old_locationt   new_build_dirRF   t   new_location(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   correct_build_location   s0    							c         C   s   |  j  d  k r d  S|  j  j S(   N(   R0   R5   t   project_name(   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyRF      s    c         C   s&   |  j  d  k r d  St j |  j  j  S(   N(   R0   R5   R   t   quotet   unsafe_name(   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   url_name   s    c         C   s   t  j j |  j d  S(   Ns   setup.py(   RK   RL   Re   R2   (   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   setup_py   s    c         C   s  |  j  s t  |  j r/ t j d |  j  n t j d |  j  t j d 7_ z |  j } | j d t	 |  j
   } | j d t	 |  j   } |  j s | r g  } nF t j j |  j  d  } t j j |  s t j |  n  d d g } t t j d | d	 g | d
 |  j  d |  j d t d t j d d Wd  t j d 8_ X|  j st j j d |  j    |  _ |  j   n  d  S(   Ns(   Running setup.py egg_info for package %ss-   Running setup.py egg_info for package from %si   t   __SETUP_PY__t   __PKG_NAME__s   pip-egg-infos
   --egg-bases   -ct   egg_infot   cwdt   filter_stdoutt   show_stdoutt   command_levelt   command_descs   python setup.py egg_infos   %(Name)s==%(Version)s(   R2   Ri   RF   R   t   notifyR4   t   indentt   _run_setup_pyt   replacet   reprRu   R3   RK   RL   Re   Rc   t   makedirsR   t   syst
   executablet   _filter_installt   Falset   VERBOSE_DEBUGR0   R-   R.   R/   t   pkg_infoRp   (   R>   t   force_root_egg_infot   scriptt   egg_base_optiont   egg_info_dir(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   run_egg_info   s2    						s7  
__file__ = __SETUP_PY__
from setuptools.command import egg_info
def replacement_run(self):
    self.mkpath(self.egg_info)
    installer = self.distribution.fetch_build_egg
    for ep in egg_info.iter_entry_points('egg_info.writers'):
        # require=False is the change we're making:
        writer = ep.load(require=False)
        if writer:
            writer(self, ep.name, egg_info.os.path.join(self.egg_info,ep.name))
    self.find_sources()
egg_info.egg_info.run = replacement_run
exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))
c         C   s   |  j  d  k	 r5 |  j  j |  s% d  S|  j  j |  S|  j sD t  |  j |  } t j j	 |  si d  St
 | d  } | j   } | j   | S(   Nt   r(   R7   R5   t   has_metadatat   get_metadataR2   Ri   t   egg_info_pathRK   RL   Rc   t   opent   readt   close(   R>   t   filenamet   fpt   data(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   egg_info_data   s    
c   	   	   C   s6  |  j  d  k r |  j r$ |  j } n t j j |  j d  } t j |  } |  j rg  } xt j |  D]\ } } } x- t	 j
 D]" } | | k r | j |  q q Wx | D] } t j j t j j | | d d   st j j t j j | | d d   r| j |  n  | d k s,| d k r | j |  q q W| j g  | D] } t j j | |  ^ qM qj Wg  | D] } | j d  rz| ^ qz} n  | st d	 | | f   n  | st d
 | | f   t |  d k r| j d d    n  t j j | | d  |  _  n  t j j |  j  |  S(   Ns   pip-egg-infot   bint   pythont   Scriptss
   Python.exet   testt   testss	   .egg-infos#   No files/directores in %s (from %s)s$   No files/directories in %s (from %s)i   t   keyc         S   s8   |  j  t j j  t j j r3 |  j  t j j  p6 d S(   Ni    (   t   countRK   RL   RP   t   altsep(   t   x(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   <lambda>*  s   i    (   R6   R5   R3   R2   RK   RL   Re   t   listdirt   walkR   t   dirnamest   removeRc   t   extendt   endswithR   Ri   t   lent   sort(	   R>   R   t   baset	   filenamest   roott   dirst   filest   dirt   f(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR   	  s6    		''	*+c         C   so   |  j  |  } | s g  Sg  } xI | j   D]; } | j   } | s, | j d  rZ q, n  | j |  q, W| S(   Nt   #(   R   t
   splitlinesRJ   RA   t   append(   R>   R   R   t   resultt   line(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   egg_info_lines0  s    c         C   s^   t    } |  j d  } | sA t j d t |  j d    n  | j | pP d  | j   S(   Ns   PKG-INFOs   No PKG-INFO file found in %st    (   R   R   R   RR   R   R   t   feedR   (   R>   t   pR   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR   <  s    	#c         C   s   |  j  d  S(   Ns   dependency_links.txt(   R   (   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   dependency_linksD  s    s	   \[(.*?)\]c         c   s   d  } xx |  j d  D]g } |  j j | j    } | rO | j d  } q n  | rx | | k rx t j d |  q n  | Vq Wd  S(   Ns   requires.txti   s   skipping extra %s(   R5   R   t   _requirements_section_ret   matchRb   t   groupR   Rj   (   R>   R+   t   in_extraR   R   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   requirementsJ  s    c         c   s5   x. |  j  j D]  \ } } | d k r | Vq q Wd  S(   Ns   ==(   R0   t   specs(   R>   t	   qualifiert   version(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   absolute_versionsW  s    c         C   s   |  j    d S(   NR   (   R   (   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   installed_version]  s    c         C   s   |  j  s t  |  j d  k r" d  S|  j } | |  j k r t j d t |  j   | |  f  t	 d t |  j   | |  f   n# t j
 d t |  j   | |  f  d  S(   NsH   Source in %s has the version %s, which does not match the requirement %ss2   Source in %s has version %s that conflicts with %ss;   Source in %s has version %s, which satisfies requirement %s(   R2   Ri   R1   R5   R   R0   R   t   fatalR   R   Rj   (   R>   R   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   assert_source_matches_versiona  s    		c         C   s  |  j  s! t j d |  j  d  S|  j s0 t  |  j s? t  |  j  j d  rU d  Sd |  j  k sw t d |  j    |  j s d  S|  j  j d d  \ } } t	 j
 |  } | r | |  j   } | r | j |  j  q| j |  j  n d st d |  j  | f   d  S(   Ns>   Cannot update repository at %s; repository location is unknowns   file:t   +s   bad url: %ri   i    s+   Unexpected version control type (in %s): %s(   R4   R   t   infoR2   R3   Ri   RA   R;   t   splitR   t   get_backendt   obtaint   export(   R>   R   t   vc_typeR4   t   backendt   vcs_backend(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   update_editables  s(    	"		c         C   s  |  j    s% t d |  j f   n  |  j p4 |  j } t |  } t j j | j	 | j
    d } | j d t j d  } | j
   d } t |  } t j j |  } t j j |  }	 | s |	 r| r | }
 n | }
 | j |
  | j d  rLxN | j d  j   D]4 } t j j t j j |
 |   } | j |  qWn  | j d  r,| j d  r|| j d  } n g  } x g  | j d  j   D] } | r| | k r| ^ qD]M } t j j | j	 |  } | j |  | j | d	  | j | d
  qWq,n| j	 j |  rq| j | j	  t j j t j j | j	  d  } | j | d |  n t j j |  r,t | d  } t j j | j   j    } | j   | | j	 k st d | |  j | j	 f   | j |  t j j t j j |  d  } | j | | j	  n  | j d  r| j d  rxh | j  d  D]T } | j t j j t! |   t" j# d k rZ| j t j j t! |  d  qZqZWn  | j d  rt$ j%   } | j& t' | j( d    | j) d  rx | j* d  D] \ } } | j t j j t! |   t" j# d k r| j t j j t! |  d  | j t j j t! |  d  | j t j j t! |  d  qqWqn  | j+ |  | |  _, d S(   s  
        Uninstall the distribution currently satisfying this requirement.

        Prompts before removing or modifying files unless
        ``auto_confirm`` is True.

        Refuses to delete or modify files outside of ``sys.prefix`` -
        thus uninstallation within a virtual environment can only
        modify that virtual environment, even if the virtualenv is
        linked to global site-packages.

        s.   Cannot uninstall requirement %s, not installeds	   .egg-infos   -py%sR   s   .eggs   installed-files.txts   top_level.txts   namespace_packages.txts   .pys   .pycs   easy-install.pths   ./R   s;   Egg-link %s does not match installed location of %s (at %s)t   scriptst   win32s   .bats   entry_points.txtt   console_scriptss   .exes   .exe.manifests
   -script.pyN(-   t   check_if_existsR   RF   R7   R8   t   UninstallPathSetRK   RL   Re   R[   t   egg_nameR   R-   t   PY_MAJORR   Rc   t   addR   R   R   RM   R   t   dirnamet   add_pthRQ   R   t   normcaset   readlineRJ   R   Ri   t   metadata_isdirt   metadata_listdirR    R   t   platformR   t   SafeConfigParsert   readfpt   FakeFilet   get_metadata_linest   has_sectiont   itemsR   R=   (   R>   t   auto_confirmt   distt   paths_to_removet   pip_egg_info_patht   debian_egg_info_patht   easy_install_eggt   develop_egg_linkt   pip_egg_info_existst   debian_egg_info_existsR   t   installed_fileRL   t
   namespacesR   t   top_level_pkgt   easy_install_ptht   fht   link_pointerR   t   configRF   t   value(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt	   uninstall  s~    	!"	
.	*  -c         C   s4   |  j  r |  j  j   n t j d |  j f  d  S(   Ns'   Can't rollback %s, nothing uninstalled.(   R=   t   rollbackR   t   errorRq   (   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   rollback_uninstall  s    		c         C   s4   |  j  r |  j  j   n t j d |  j f  d  S(   Ns%   Can't commit %s, nothing uninstalled.(   R=   t   commitR   R   Rq   (   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   commit_uninstall  s    		c         C   s  |  j  s t  t } d |  j |  j f } t j j | |  } t j j |  rt	 d t
 |  d  } | d k r t } q| d k r t j d t
 |   t j |  q| d k rt |  } t j d t
 |  t
 |  f  t j | |  qn  | rt j | d t j  } t j j t j j |  j    } xt j |  D] \ }	 }
 } d |
 k r~|
 j d  n  xl |
 D]d } t j j |	 |  } |  j | |  } t j |  j d	 | d	  } d | _ | j | d  qWxb | D]Z } | t k rqn  t j j |	 |  } |  j | |  } | j | |  j d	 |  qWqSW| j   t j d 8_ t j  d t
 |   n  d  S(   Ns	   %s-%s.zips/   The file %s exists. (i)gnore, (w)ipe, (b)ackup t   it   wR   s   Deleting %ss   Backing up %s to %ss   pip-egg-infot   /i  i   R   i   s   Saved %s(   R   R   R   i  (!   R2   Ri   RB   RF   R   RK   RL   Re   Rc   R
   R   R   R   RR   R   R   Rk   Rl   t   zipfilet   ZipFilet   ZIP_DEFLATEDR   RN   R   t   _clean_zip_namet   ZipInfot   external_attrt   writestrt   PIP_DELETE_MARKER_FILENAMEt   writeR   R   R~   (   R>   Rf   t   create_archivet   archive_namet   archive_patht   responset	   dest_filet   zipR   t   dirpathR   R   R   RF   t   zipdirR   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   archive  sN    		!	#
c         C   s_   | j  | t j j  s/ t d | | f   | t |  d } | j t j j d  } | S(   Ns$   name %r doesn't start with prefix %ri   R  (   RA   RK   RL   RP   Ri   R   R   (   R>   RF   t   prefix(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR     s
    c         C   s  |  j  r |  j | |  d  St j d d  } t j j | d  } zt j d d |  j	 g t
 |  d d d | g } t   r | d	 t j j t j d
 d d t    g 7} n  t j d |  j  t j d 7_ z* t | | d |  j d |  j d t Wd  t j d 8_ Xt j j |  s<t j d |  d  St |  _ t |  } xH | D]+ } | j   } | j d  rX| } PqXqXWt j d |   d  S| j   g  }	 t |  } xU | D]M } | j   }
 t j j |
  r|
 t j j 7}
 n  |	 j  t! |
 |   qW| j   t t j j | d  d  } | j" d j |	  d  | j   Wd  t j j |  rt j# |  n  t j$ |  Xd  S(   Ns   -records   pip-s   install-record.txts   -csj   import setuptools;__file__=%r;exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))t   installs#   --single-version-externally-manageds   --records   --install-headerst   includet   siteR   s   Running setup.py install for %si   Ry   Rz   R{   s   Record file %s not founds	   .egg-infos;   Could not find .egg-info directory in install record for %ss   installed-files.txtR   s   
(%   R3   t   install_editableR_   R`   RK   RL   Re   R   R   Ru   t   listR   R  R   R   R~   RF   R   R   R2   R   R   Rc   RB   R<   R   RJ   R   RR   R   RO   RP   R   R   R
  R   t   rmdir(   R>   t   install_optionst   global_optionst   temp_locationt   record_filenamet   install_argsR   R   R   t	   new_linesR   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR  '  s^    	 		

c         C   s   |  j  s t j j |  j  rW t j d |  j  |  j rK t |  j  n  d |  _ n  |  j
 r t j j |  j
  r t |  j
  n  d |  _
 d S(   sV   Remove the source files from this requirement, if they are marked
        for deletions   Removing source in %sN(   t	   is_bundleRK   RL   Rc   t   delete_marker_filenameR   R   R2   R   R5   R9   (   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   remove_temporary_sourced  s    	c         C   s   t  j d |  j  t  j d 7_ zW t t j d d |  j g t |  d d g t |  d |  j	 d |  j
 d	 t Wd  t  j d 8_ Xt |  _ d  S(
   Ns   Running setup.py develop for %si   s   -csl   import setuptools; __file__=%r; exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))t   develops	   --no-depsRy   Rz   R{   (   R   R~   RF   R   R   R   R   Ru   R  R2   R   R   RB   R<   (   R>   R  R  (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR  p  s    7c         C   sa   t  j } xK d d d d d d d d g D]+ } t j | | j    r( t  j } Pq( q( W| | f S(	   Ns   ^running .*s   ^writing .*s   ^creating .*s   ^[Cc]opying .*s   ^reading .*s4   ^removing .*\.egg-info' \(and everything under it\)$s   ^byte-compiling s7   ^warning: manifest_maker: standard file '-c' not found$(   R   t   NOTIFYRV   RW   RJ   t   INFO(   R>   R   t   levelt   regex(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR     s    		c         C   ss   |  j  d k r t Sy t j |  j   |  _ Wn@ t j k
 rC t St j k
 rn t j |  j  j  |  _	 n Xt
 S(   s   Find an installed distribution that satisfies or conflicts
        with this requirement, and set self.satisfied_by or
        self.conflicts_with appropriately.N(   R0   R5   R   R-   t   get_distributionR7   t   DistributionNotFoundt   VersionConflictRq   R8   RB   (   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR     s    c         C   su   |  j  d  k	 r |  j  S|  j } | s) t St j j t j j | d   ph t j j t j j | d   |  _  |  j  S(   Ns   pip-manifest.txts   pyinstall-manifest.txt(   R:   R5   R9   R   RK   RL   Rc   Re   (   R>   R   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR!    s    	!$c   
      c   s;  x |  j  D] } t j j |  } x t j D] } d  } } t j j | | j  } t j j	 |  r, | j
 } t |  } | j   }	 | j   |   j |	  \ } } Pq, q, W| r d | | | f } n d  } t | |  d t d | d t d | Vq
 Wx7 |  j D], } t j j |  } t | |  d | VqWd  S(   Ns   %s+%s@%sR3   R4   R;   R2   (   t   _bundle_editable_dirsRK   RL   t   basenameR   t   backendsR5   Re   t   bundle_fileRc   RF   R   R   R   t   parse_vcs_bundle_fileR*   RB   R   t   _bundle_build_dirs(
   R>   t   dest_dirt   packageR   R4   t   revt   vcs_bundle_fileR   R   t   content(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   bundle_requirements  s0    
		
	c         C   s  |  j  } | s t  t j j | d  } t j j | d  } g  } g  } x#| | | f | | | f g D]\ } }	 }
 t j j |  rj x t j |  D] } t j j |	 |  } |
 j |  t j j |  r t j	 d | | |  f  q n  t j j |	  s(t j
 d |	  t j |	  n  t j t j j | |  |  q Wt j |  smt j |  qmqj qj Wd  |  _  | |  _ | |  _ d  S(   Nt   srct   buildsZ   The directory %s (containing package %s) already exists; cannot move source from bundle %ss   Creating directory %s(   R9   Ri   RK   RL   Re   Rc   R   R   R   RR   R   R   Rk   Rl   R  R5   R1  R,  (   R>   t   dest_build_dirt   dest_src_dirR   t   src_dirRf   t   bundle_build_dirst   bundle_editable_dirsR2   R2  t   dir_collectionR   t   dest(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   move_bundle_files  s4    		#		c         C   s%   |  j  s t  t j j |  j  t  S(   N(   R2   Ri   RK   RL   Re   R	  (   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR"    s    N(    (    (    (.   t   __name__t
   __module__R5   R   RB   R?   t   classmethodRG   RY   R^   R\   Rh   Rp   t   propertyRF   Rt   Ru   R   R   R   R   R   R   R   RV   t   compileR   R   R   R   R   R   R   R   R   R  R  R  R#  R  R   R   R!  R7  RA  R"  (    (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR*   "   sP   $			0		'			]			)	=					s   This file is placed here by pip to indicate the source was put
here by pip.

Once this package is successfully installed this source code will be
deleted (unless you remove this file).
t   Requirementsc           B   sG   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   c         C   s   g  |  _  i  |  _ d  S(   N(   t   _keyst   _dict(   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR?     s    	c         C   s   |  j  S(   N(   RH  (   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   keys  s    c         C   s2   g  } x% |  j  D] } | j |  j |  q W| S(   N(   RH  R   RI  (   R>   t   values_listR   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   values  s    c         C   s   | |  j  k S(   N(   RH  (   R>   t   item(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   __contains__  s    c         C   s3   | |  j  k r" |  j  j |  n  | |  j | <d  S(   N(   RH  R   RI  (   R>   R   R   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   __setitem__  s    c         C   s   |  j  | S(   N(   RI  (   R>   R   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   __getitem__  s    c         C   sJ   g  |  j    D]& } d t |  t |  |  f ^ q } d d j |  S(   Ns   %s: %ss   Requirements({%s})s   , (   RJ  R   Re   (   R>   t   kRL  (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   __repr__  s    9(	   RB  RC  R?   RJ  RL  RN  RO  RP  RR  (    (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyRG    s   						t   RequirementSetc           B   s   e  Z d e e e e d   Z d   Z d   Z d   Z e d    Z	 e d    Z
 e d    Z d   Z e d  Z d	   Z e e d
  Z e d  Z d   Z d   Z e d  Z d d  Z d   Z d Z d   Z d   Z RS(   c	   	      C   s   | |  _  | |  _ | |  _ | |  _ | |  _ | |  _ | |  _ t   |  _ i  |  _	 g  |  _
 | |  _ g  |  _ g  |  _ g  |  _ d  S(   N(   Rf   R<  t   download_dirt   download_cachet   upgradet   ignore_installedt   force_reinstallRG  R   t   requirement_aliasest   unnamed_requirementst   ignore_dependenciest   successfully_downloadedt   successfully_installedt   reqs_to_cleanup(	   R>   Rf   R<  RT  RU  RV  RW  R[  RX  (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR?     s    												c         C   sg   g  |  j  j   D] } | j s | ^ q } | j d d    d j g  | D] } t | j  ^ qK  S(   NR   c         S   s   |  j  j   S(   N(   RF   Rb   (   R0   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR   $  s    t    (   R   RL  R1   R   Re   RZ   R0   (   R>   R0   t   reqs(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR^   !  s    c         C   s   | j  } | s" |  j j |  ni |  j |  rV t d | |  j |  | f   n  | |  j | <| j   | k r | |  j | j   <n  d  S(   Ns4   Double requirement given: %s (aready in %s, name=%r)(	   RF   RZ  R   t   has_requirementR   t   get_requirementR   Rb   RY  (   R>   t   install_reqRF   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   add_requirement'  s    	c         C   sC   x< | | j    f D]( } | |  j k s7 | |  j k r t Sq Wt S(   N(   Rb   R   RY  RB   R   (   R>   Rq   RF   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyRa  5  s    c         C   s   t  |  j j    p |  j S(   N(   R  R   RL  RZ  (   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   has_requirements;  s    c         C   sD   t  d   |  j j   D  r# t St  d   |  j D  r@ t St S(   Nc         s   s   |  ] } | j  Vq d  S(   N(   R3   (   t   .0R0   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pys	   <genexpr>A  s    c         s   s   |  ] } | j  Vq d  S(   N(   R3   (   Rf  R0   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pys	   <genexpr>C  s    (   R   R   RL  RB   RZ  R   (   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   has_editables?  s
    c         C   sg   |  j  rc t j j |  j   |  _  t j j |  j   r: t St j d  t d t	 |  j     n  t
 S(   Ns!   Could not find download directorys0   Could not find or access download directory '%s'(   RT  RK   RL   t
   expanduserRc   RB   R   R   R   R   R   (   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   is_downloadG  s    	c         C   sl   xU | | j    f D]A } | |  j k r3 |  j | S| |  j k r |  j |  j | Sq Wt d |   d  S(   Ns   No project with the name %r(   Rb   R   RY  t   KeyError(   R>   Rq   RF   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyRb  T  s    c         C   s8   x1 |  j  j   D]  } | j d |  | j   q Wd  S(   NR   (   R   RL  R   R   (   R>   R   R0   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR   \  s    c         C   sr  t  |  j  } t  |  j j    } xG| s3 | rm| rK | j d  } n | j d  } t } |  j r | j r | j   | j	 r |  j
 r | j	 | _ d  | _	 q t } n  | j	 r t j d |  q n  | j r| j d  k r)| j |  j  | _ q)n% | r)| j |  j |  j  | _ n  | j d  k	 r' t j j | j  r' t d | | j f   q' q' Wd  S(   Ni    s<   Requirement already satisfied (use --upgrade to upgrade): %ss   Could not install requirement %s because source folder %s does not exist (perhaps --no-download was used without first running an equivalent install with --no-install?)(   R  RZ  R   RL  t   popRB   RW  R3   R   R7   RV  R8   R5   R   R   R~   R2   Rh   R<  Rf   Ri  RK   RL   RO   R   (   R>   t   unnamedR`  t   req_to_installt   install_needed(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   locate_filesa  s2    
						%c         C   s  t  |  j  } t  |  j j    } xv| s3 | r| rK | j d  } n | j d  } t } t } |  j rK| j rK| j	   | j
 r|  j r|  j s y | j | |  j  }	 Wn t k
 r t } t } q X|	 j | _ n  | s| j
 | _ d | _
 qqt } n  | j
 rK| r4t j d |  qHt j d |  qKn  | j rht j d |  n^ | r| j r| j j   j d  rt j d t t | j    qt j d |  n  t j d 7_ zt }
 | j r| j d k r| j |  j  } | | _ n	 | j } t j j |  j  sBt  |  j  n  | j! |  j"  |  j" ry| j#   | j$ |  j%  q| j#   na| r| j |  j |  j"  } t } d }	 t j j t j j& | d	   s| j d k r| j | d
 |  j }	 n t' | j  }	 |	 st(  |	 ry |  j) |	 | |  j"  Wqt* k
 rt+ j,   d } t j- d | | f  t. d | | |	 f   qXqt } n  | r| j/ }
 |
 r| j0 |  j |  j  x | j1   D]  } | j2 |  |  j3 |  qWn |  j" r@| | _ | j#   |	 r|	 j4 t5 j6 k r| j$ |  j%  qn[ | | _ | j#   | rl| j# d t  n  | j7   | r| j r|  j8 |  t } n  | j	   | j
 r|  j s|  j r| j
 | _ d | _
 qt } qqn  |
 s+| j9 | j:  | j; r&t j d d j& | j;   n  |  j< sx | j | j;  D] } y t= j> j? |  j@ } Wn> tA k
 rt+ j,   d } t jB d | | | f  qBn X|  jC |  rqBn  tD | |  } | j2 |  |  j3 |  qBWn  | jE |  j k r| |  j | jE <n  |  j" r;|  jF j2 |  q;n |  jF j2 |  | r|  jG j2 |  | r| j r| j j d  r|  j8 |  qn  Wd t j d 8_ Xq' Wd S(   sG   Prepare process. Create temp directories, download and/or unpack files.i    s"   Requirement already up-to-date: %ss<   Requirement already satisfied (use --upgrade to upgrade): %ss   Obtaining %ss   file:s   Unpacking %ss   Downloading/unpacking %si   s   setup.pyRV  i   s4   Could not install requirement %s because of error %ssD   Could not install requirement %s because of HTTP error %s for URL %sR   s!   Installing extra requirements: %rt   ,s.   Invalid requirement: %r (%s) in requirement %ss   file:///N(H   R  RZ  R   RL  Rk  RB   R   RW  R3   R   R7   RV  RX  t   find_requirementR   R4   R8   R5   R   R~   Rb   RA   R   R"   R   R2   Rh   R<  RK   RL   Rc   Rf   Rd   R   Ri  R   R  RT  Re   R   Ri   t
   unpack_urlR   R   t   exc_infoR   R   R!  RA  R7  R   Rd  RU   R   t   all_schemesR   t   copy_to_build_dirt   add_dependency_linksR   R+   R[  R-   R.   R/   Rq   t
   ValueErrorR   Ra  R*   RF   R^  R\  (   R>   t   finderR   t   bundleRl  R`  Rm  R  t   best_installedR4   R!  R[   Rg   t   et   subreqR0   RF   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   prepare_files  s    
			
					!#			
!					
	

	
		 		!c         C   s   t  j d  t  j d 7_ x |  j D] } | j   q& Wg  } |  j   r_ | j |  j  n  | rx | j |  j  n  x> | D]6 } t	 j
 j |  r t  j d |  t |  q q Wt  j d 8_ d S(   s   Clean up files, remove builds.s   Cleaning up...i   s   Removing temporary dir %s...N(   R   R~   R   R^  R#  t   _pip_has_created_build_dirR   Rf   R<  RK   RL   Rc   R   R   (   R>   Ry  R0   t
   remove_dirR   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   cleanup_files&  s    c         C   s1   |  j  t k o0 t j j t j j |  j  t   S(   N(   Rf   R   RK   RL   Rc   Re   R	  (   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR~  =  s    c         C   s   | j  r |  j p |  j } t j d | j | f  t j j | | j  } t	 | j
 |  t d d | d g d | d d d  S(   Ns   Copying %s to %sR   s   %s/setup.pyt   cleanRy   R}   s   python setup.py clean(   R3   R<  Rf   R   R   RF   RK   RL   Re   R   R2   R   (   R>   Rm  t
   target_dirR@  (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyRu  A  s    c         C   s   | r |  j  } n | } t |  r4 t | | |  St |  rM t | |  S|  j rq t j j |  j  |  _ n  t	 | | |  j |  j   } | r t
 t j j | t   n  | Sd  S(   N(   RT  R&   R%   R'   R(   RU  RK   RL   Rh  R)   t   _write_delete_marker_messageRe   R	  (   R>   RX   R[   t   only_downloadt   loct   retval(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyRr  I  s    	c         C   sh  g  |  j  j   D] } | j s | ^ q } | rd t j d d j g  | D] } | j ^ qG   n  t j d 7_ z x | D] } | j r t j d | j  t j d 7_ z | j	 d t
  Wd t j d 8_ Xn  y | j | |  Wn* | j r| j r| j   n    n  X| j r9| j r9| j   n  | j   q} WWd t j d 8_ X| |  _ d S(   sR   Install everything in this set (after having downloaded and unpacked the packages)s!   Installing collected packages: %ss   , i   s   Found existing installation: %sR   N(   R   RL  R7   R   R~   Re   RF   R   R8   R   RB   R  R<   R   R   R#  R]  (   R>   R  R  R   t
   to_installR0   t   requirement(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR  Z  s2    3		c         C   s  t  j | d t  j  } g  } xJ|  j d f |  j d f f D]*\ } } t j j t j j |   } xt j	 |  D]\ } } } x t
 j D] }	 |	   }
 d  } } |
 j | k r xR | D] } | j |  r Pq q W|
 j t j j | |   \ } } | j |  |
 j } |
 j i | d 6| d 6} | j |
 j  Pq q Wd | k re| j d  n  xQ | D]I } t j j | |  } |  j | |  } | j | d | d d  qlWx_ | D]W } | t k rqn  t j j | |  } |  j | |  } | j | | d |  qW| rw t j j | |  } |  j | |  } | j | d | |  qw qw Wq= W| j d	 |  j    | j   d  S(
   NR   R9  R8  R4   R4  s   pip-egg-infoR  R   s   pip-manifest.txt(   R  R  R  Rf   R<  RK   RL   R   RN   R   R   R.  R5   R   RA   t   get_infoRe   R   R/  t   guideR   R  R  R	  R
  R7  R   (   R>   t   bundle_filenameR  t   vcs_dirsR   R-  R  R   R   R   R   t   vcs_urlt   vcs_revt   vcs_dirR5  t	   vcs_guideR   RF   R   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   create_bundle{  sL    +	
	 #s   # This is a pip bundle file, that contains many source packages
# that can be installed as a group.  You can install this like:
#     pip this_file.zip
# The rest of the file contains a list of all the packages included:
c         C   s   |  j  g } xP g  |  j j   D] } | j s | ^ q D]# } | j d | j | j f  q8 W| j d  xP g  |  j j   D] } | j r | ^ q D]# } | j d | j | j f  q Wd j |  S(   Ns   %s==%s
sC   # These packages were installed to satisfy the above requirements:
R   (   t   BUNDLE_HEADERR   RL  R1   R   RF   R   Re   (   R>   t   partsR0   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR7    s    !!c         C   s_   | j  | t j j  s/ t d | | f   | t |  d } | j t j j d  } | S(   Ns$   name %r doesn't start with prefix %ri   R  (   RA   RK   RL   RP   Ri   R   R   (   R>   RF   R  (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR    s
    N(    (   RB  RC  R5   R   R?   R^   Rd  Ra  RE  Re  Rg  Ri  Rb  R   Ro  R}  R  R~  Ru  Rr  R  R  R  R7  R  (    (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyRS    s,   					%		!	7	c         C   s*   t  j |   t t  j j |  t   d  S(   N(   RK   R   R  RL   Re   R	  (   Rf   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyRd     s    c         C   s*   t  |  d  } | j t  | j   d  S(   NR   (   R   R
  t   DELETE_MARKER_MESSAGER   (   t   filepatht	   marker_fp(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR    s    s   ^(http|https|file):c         c   s  d  } | j } | r' t j |  } n  t |  d | \ }  } xUt | j    D]A\ } } | d 7} | j   } | sR | j d  r qR n  | r | j	 |  r qR n  | j d  s | j d  r| j d  r | d j   }	 n | t
 d  j   j d  }	 t j	 |   r.t j |  |	  }	 n3 t j	 |	  sat j j t j j |   |	  }	 n  x/t |	 | d |  d | D] }
 |
 Vq}WqR | j d	  s| j d
  rqR | j d  s| j d  r+| j d  r| d j   } n | t
 d  j   j d  } | r| j j |  qqR | j d  sI| j d  r| j d  rk| d j   } n | t
 d  j   j d  } | r| g | _ qqR | j d  r| t
 d  j   j d  } | r| j j |  qqR d |  | f } | j d  s| j d  r|| j d  r<| d j   } n | t
 d  j   j d  } t j | d | d | j } n t j | |  } | VqR Wd  S(   NR1   i   R   s   -rs   --requirementi   t   =t   optionss   -Zs   --always-unzips   -fs   --find-linkss   -is   --index-urls   --extra-index-urls   -r %s (line %s)s   -es
   --editableRE   (   R5   t   skip_requirements_regexRV   RF  R    t	   enumerateR   RJ   RA   RW   R   t
   _scheme_reR   t   urljoinRK   RL   Re   R   t   parse_requirementst   lstript
   find_linksR   t
   index_urlsR*   RG   RE   RY   (   R   Rx  R1   R  t
   skip_matcht
   skip_regexR6  t   line_numberR   t   req_urlRM  R0   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR    sb    	
$"c   	      C   s  |  } t  j j |  rH t  j j t  j j | d   rH t |  } n  | j   j d  rg d | f Sx: t	 D]2 } | j   j d |  rn d | | f } qn qn Wd | k r | r | d | } q t
 d |    n  | j d d  d j   } t	 j |  st
 d	 |    n  t j d
 |   } | sA| j d  rt	 j |  rg  |  j d d  d j d  D] } | rp| ^ qp} | d d k r| d } q| d d k r| d } qt
 d |    n | j d  } t j d |  } | r| j d  } n  | | f S(   sS   Parses svn+http://blahblah@rev#egg=Foobar into a requirement
    (Foobar) and a URLs   setup.pys   file:s   %s:s   %s+%sR   sJ   --editable=%s should be formatted with svn+URL, git+URL, hg+URL or bzr+URLi   i    ss   For --editable=%s only svn (svn+URL), Git (git+URL), Mercurial (hg+URL) and Bazaar (bzr+URL) is currently supporteds   (?:#|#.*?&)egg=([^&]*)R   R  it   tagst   branchest   tagt   branchiit   trunks@   --editable=%s is not the right format; it must have #egg=Packages   ^(.*?)(?:-dev|-\d.*)$N(   s   tagsR  s   tags   branch(   RK   RL   RO   Rc   Re   R#   Rb   RA   R5   R   R   R   R   RV   RW   R   (	   RD   RE   R4   t   version_controlR   R   R   R  R0   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR@     s@    3
&8R   c           B   sk   e  Z d  Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 e
 d  Z d	   Z d
   Z RS(   sM   A set of file paths to be removed in the uninstallation of a
    requirement.c         C   s@   t    |  _ t    |  _ i  |  _ | |  _ d  |  _ g  |  _ d  S(   N(   t   sett   pathst   _refuset   pthR   R5   t   save_dirt   _moved_paths(   R>   R   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR?   C  s    			c         C   s
   t  |  S(   ss   
        Return True if the given path is one we are permitted to
        remove/modify, False otherwise.

        (   R   (   R>   RL   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt
   _permittedK  s    c         C   sF   t  |  j  sB t j d |  j j t |  j j  t j f  t	 St
 S(   Ns1   Not uninstalling %s at %s, outside environment %s(   R   R   R   R~   Rq   R   R[   R   R  R   RB   (   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   _can_uninstallS  s
    	&c         C   sX   t  |  } t j j |  s" d  S|  j |  rD |  j j |  n |  j j |  d  S(   N(   R   RK   RL   Rc   R  R  R   R  (   R>   RL   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR   Z  s    c         C   sk   t  |  } |  j |  rW | |  j k r@ t |  |  j | <n  |  j | j |  n |  j j |  d  S(   N(   R   R  R  t   UninstallPthEntriesR   R  (   R>   t   pth_filet   entry(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR   c  s    c      	   C   s   t    } x} t | d t D]i } t g  | D]@ } | j |  oi | t | j t j j   t j j k ^ q,  s | j	 |  q q W| S(   s   Compact a path set to contain the minimal number of paths
        necessary to contain all paths in the set. If /a/path/ and
        /a/path/to/a/file.txt are both in the set, leave only the
        shorter path.R   (
   R  t   sortedR   R   RA   t   rstripRK   RL   RP   R   (   R>   R  t   short_pathsRL   t	   shortpath(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   compactl  s    	Mc         C   s5   t  j j |  j t  j j |  d j t  j j   S(   Ni   (   RK   RL   Re   R  t
   splitdriveR  RP   (   R>   RL   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   _stashy  s    	c         C   s  |  j    s d St j d |  j j  t j d 7_ t |  j |  j   } z6| r` d } n- x | D] } t j |  qg Wt	 d d  } |  j
 r t j d  x* |  j |  j
  D] } t j |  q Wn  | d k rt j d d	 d
 d  |  _ xK | D]C } |  j |  } t j d |  |  j j |  t | |  q Wx! |  j j   D] } | j   qUWt j d |  j j  n  Wd t j d 8_ Xd S(   s[   Remove paths in ``self.paths`` with confirmation (unless
        ``auto_confirm`` is True).Ns   Uninstalling %s:i   t   ys   Proceed (y/n)? t   ns.   Not removing or modifying (outside of prefix):t   suffixs
   -uninstallR  s   pip-s   Removing file or directory %ss   Successfully uninstalled %s(   R  R  (   R  R   R~   R   Rq   R   R  R  R  R	   R  R_   R`   R  R  R   R  R   R   R  RL  R   (   R>   R   R  R  RL   t   new_pathR  (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR   }  s6    		c         C   s   |  j  d k r* t j d |  j j  t St j d |  j j  x> |  j D]3 } |  j	 |  } t j
 d |  t | |  qK Wx |  j D] } | j   q Wd S(   s1   Rollback the changes previously made by remove().s'   Can't roll back %s; was not uninstalleds   Rolling back uninstall of %ss   Replacing %sN(   R  R5   R   R   R   Rq   R   R~   R  R  R   R   R  R   (   R>   RL   t   tmp_pathR  (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR     s    c         C   s5   |  j  d k	 r1 t |  j   d |  _  g  |  _ n  d S(   s?   Remove temporary save dir: rollback will no longer be possible.N(   R  R5   R   R  (   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR     s    	(   RB  RC  t   __doc__R?   R  R  R   R   R  R  R   R   R   R   (    (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR   @  s   									"	R  c           B   s,   e  Z d    Z d   Z d   Z d   Z RS(   c         C   sG   t  j j |  s% t d |   n  | |  _ t   |  _ d  |  _ d  S(   Ns.   Cannot remove entries from nonexistent file %s(	   RK   RL   RQ   R   RI   R  t   entriesR5   t   _saved_lines(   R>   R  (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR?     s
    	c         C   sa   t  j j |  } t j d k rM t  j j |  d rM | j d d  } n  |  j j |  d  S(   NR   i    s   \R  (	   RK   RL   R   R   R   R  R   R  R   (   R>   R  (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR     s    &c         C   s   t  j d |  j  t |  j d  } | j   } | |  _ | j   t d   | D  rd d } n d } xQ |  j D]F } y, t  j d |  | j	 t
 | |   Wqt t k
 r qt Xqt Wt |  j d  } | j |  | j   d  S(   Ns   Removing pth entries from %s:t   rbc         s   s!   |  ] } t  d   | k Vq d S(   s   
N(   R   (   Rf  R   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pys	   <genexpr>  s    s   
s   
s   Removing entry: %st   wb(   R   R   RI   R   t	   readlinesR  R   R   R  R   R   Rw  t
   writelines(   R>   R   t   linest   endlineR  (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR     s"    	
	c         C   sk   |  j  d  k r' t j d |  j  t St j d |  j  t |  j d  } | j |  j   | j	   t
 S(   Ns.   Cannot roll back changes to %s, none were mades!   Rolling %s back to previous stateR  (   R  R5   R   R   RI   R   R   R   R  R   RB   (   R>   R   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR     s    
(   RB  RC  R?   R   R   R   (    (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR    s   		
	R   c           B   s)   e  Z d  Z d   Z d   Z d   Z RS(   sQ   Wrap a list of lines in an object with readline() to make
    ConfigParser happy.c         C   s   d   | D |  _  d  S(   Nc         s   s   |  ] } | Vq d  S(   N(    (   Rf  t   l(    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pys	   <genexpr>  s    (   t   _gen(   R>   R  (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR?     s    c         C   sL   y3 y t  |  j  SWn t k
 r1 |  j j    SXWn t k
 rG d SXd  S(   NR   (   t   nextR  t	   NameErrort   StopIteration(   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR     s    c         C   s   |  j  S(   N(   R  (   R>   (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   __iter__  s    (   RB  RC  R  R?   R   R  (    (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyR     s   			(K   R   RK   Rk   RV   R  R-   R_   t   pip.locationsR    R   t   pip.exceptionsR   R   R   t   pip.vcsR   t   pip.logR   t   pip.utilR   R   R	   R
   R   R   R   R   R   R   R   R   t   pipR   t   pip.backwardcompatR   R   R   R   R   R   R   R   R   R   t	   pip.indexR   R   t   pip.downloadR    R!   R"   R#   R$   R%   R&   R'   R(   R)   R	  t   objectR*   R  RG  RS  Rd   R  RF  t   IR  R5   R  R@   R   R  R   (    (    (    s_   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.pyt   <module>   sH   FF   		?+t2