£Á°è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>

7Re9  c               @   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 m Z m Z m	 Z	 d  d l
 m Z d  d l m Z d  d l m Z Gd d   d e  Z d S(   i    N(   u   display_pathu
   backup_diru   rmtree(   u   logger(   u   InstallationError(   u   Commandc                s   |  Ee  Z d  Z d Z d Z d Z d Z   f d d   Z d d   Z d	 d
   Z	 d d   Z
 d d   Z d d   Z d d   Z d d   Z d d   Z d d   Z d d   Z   S(   u
   ZipCommandu   Zip individual packages.u   zipu#   
     %prog [options] <package> ...u$   DEPRECATED. Zip individual packages.c          
      s9  t  t |   j | |   |  j d k rM |  j j d d d d d d d n( |  j j d	 d d
 d d d d d d |  j j d d d d d d d |  j j d d d d d d d d |  j j d d d d d d d |  j j d d d d d d d |  j j d d d d d d |  j j d |  j  d  S(    Nu   zipu   --unzipu   actionu
   store_trueu   destu   unzipu   helpu"   Unzip (rather than zip) a package.u   --zipu   store_falseu   defaultu"   Zip (rather than unzip) a package.u   --no-pycu   no_pycuE   Do not include .pyc files in zip files (useful on Google App Engine).u   -lu   --listu   listu2   List the packages available, and their zip status.u   --sort-filesu
   sort_filesuD   With --list, sort packages according to how many files they contain.u   --pathu   appendu   pathsu?   Restrict operations to the given paths (may include wildcards).u   -nu
   --simulateu0   Do not actually perform the zip/unzip operation.i    T(	   u   superu
   ZipCommandu   __init__u   nameu   cmd_optsu
   add_optionu   Trueu   parseru   insert_option_group(   u   selfu   argsu   kw(   u	   __class__(    u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu   __init__   sL    	
								u   ZipCommand.__init__c             C   sp  |  j  s t j Sg  } t   } x t j D] } t j j t j j |   } x |  j  D] } t j j t j j |   } d | k r t j t	 j
 | d  |  r | j |  | j |  Pq qW | j |  rW | j |  | j |  PqW qW Wt j d | d j |  j   f  q) WxJ |  j  D]? } | | k r)d | k r)| j |  t j d |  q)q)W| S(   u:   All the entries of sys.path, possibly restricted by --pathu   *u,   Skipping path %s because it doesn't match %su   , uD   Adding path %s because it doesn't match anything already on sys.path(   u   select_pathsu   sysu   pathu   setu   osu   normcaseu   abspathu   reu   searchu   fnmatchu	   translateu   appendu   addu
   startswithu   loggeru   debugu   join(   u   selfu   resultu	   match_anyu   pathu   match(    (    u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu   paths>   s2    				u   ZipCommand.pathsc             C   sV  t  j d d  | j |  _ | j |  _ | j rA |  j | |  S| sV t d   n  g  } x | D] } |  j |  \ } } | j r t	 j
 j |  r t d | | f   n6 | j r t	 j
 j |  r t d | | f   n  | j | | f  qc Wd  } xJ | D]B \ } } | j r6|  j | |  } q|  j | | | j  } qW| S(   Nu   1.7u_   DEPRECATION: 'pip zip' and 'pip unzip` are deprecated, and will be removed in a future release.u2   You must give at least one package to zip or unzipu;   The module %s (in %s) is not a zip file; cannot be unzippedu:   The module %s (in %s) is not a directory; cannot be zipped(   u   loggeru
   deprecatedu   pathsu   select_pathsu   simulateu   listu   InstallationErroru   find_packageu   unzipu   osu   pathu   isdiru   appendu   Noneu   unzip_packageu   zip_packageu   no_pyc(   u   selfu   optionsu   argsu   packagesu   argu   module_nameu   filenameu   last_status(    (    u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu   run\   s4    		u   ZipCommand.runc             C   s  t  j j |  } t  j j |  rP t j |  rP t d | | | f   n  t  j j |  } | |  j   k r t j	 d t
 |  t
 |  t
 |  f  n  t j d | t
 |  f  |  j r t j d  d  St j d 7_ zt j |  } g  } x| j   D]} | j } | j | t  j j  r| j |  }	 t  j j | |  }
 t  j j t  j j |
   st  j t  j j |
   n  |	 r|
 j t  j j  rt  j j |
  st  j |
  qqt |
 d  } | j |	  | j   q| j | | j |  f  qW| j   | sbt j d t
 |   t  j |  |  j |  n` t j d | t
 |  f  t j | d	  } x$ | D] \ } }	 | j | |	  qW| j   Wd  t j d 8_ Xd  S(
   Nu3   Module %s (in %s) isn't located in a zip file in %su/   Unpacking %s into %s, but %s is not on sys.pathu   Unzipping %s (in %s)u3   Skipping remaining operations because of --simulatei   u   wbu   Removing now-empty zip file %su(   Removing entries in %s/ from zip file %su   w(    u   osu   pathu   dirnameu   isfileu   zipfileu
   is_zipfileu   InstallationErroru   pathsu   loggeru   warnu   display_pathu   notifyu   simulateu   indentu   ZipFileu   infolistu   filenameu
   startswithu   sepu   readu   joinu   existsu   makedirsu   endswithu   openu   writeu   closeu   appendu   infou   unlinku   remove_filename_from_pthu   writestr(   u   selfu   module_nameu   filenameu   zip_filenameu   package_pathu   zipu   to_saveu   infou   nameu   contentu   destu   f(    (    u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu   unzip_package{   sX    "		 
u   ZipCommand.unzip_packagec             C   sN  | } t  j d | t |  f  t  j d 7_ | j d  rJ | } n
 | d } z| | k r t |  } t  j d | | f  |  j s t j | |  q n  yvt  j	 d t |   |  j st
 j | d  } | j | d d	  x t j |  D] \ } } }	 | r)d
 d   |	 D }	 n  x | d f |	 d f g D] \ }
 } x |
 D] } t j j | |  } t j j | | t |  d   j t j j  |  } | r| j | d d	  qU| j | |  qUWqBWq W| j   n  t  j	 d t |   |  j st |  n  Wn   Yn X|  j |  Wd  t  j d 8_ Xd  S(   Nu   Zip %s (in %s)i   u   .eggu   .zipu   Moving %s aside to %su   Creating zip file in %su   wu   /u    c             S   s+   g  |  ]! } | j    j d   s |  q S(   u   .pyc(   u   loweru   endswith(   u   .0u   f(    (    u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu
   <listcomp>   s   	 u*   ZipCommand.zip_package.<locals>.<listcomp>u   Removing old directory %sTF(   u   loggeru   notifyu   display_pathu   indentu   endswithu
   backup_diru   simulateu   shutilu   moveu   infou   zipfileu   ZipFileu   writestru   osu   walku   Trueu   Falseu   pathu   joinu   lenu   lstripu   sepu   writeu   closeu   rmtreeu   add_filename_to_pth(   u   selfu   module_nameu   filenameu   no_pycu   orig_filenameu   dest_filenameu   zipu   dirpathu   dirnamesu	   filenamesu   fnsu   is_diru   fnu   fullu   dest(    (    u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu   zip_package   sF    	
		%7	u   ZipCommand.zip_packagec                s  x |  j    D] } t | d  } | j   } | j     f d d   | D } | | k r t j d t    t |  f  d d   | D s t j d t |   |  j s t j	 |  q n2 |  j s t | d  } | j
 |  | j   n  d  Sq Wt j d t     d  S(	   Nu   rc                s(   g  |  ] } | j      k r |  q S(    (   u   strip(   u   .0u   l(   u   filename(    u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu
   <listcomp>   s   	 u7   ZipCommand.remove_filename_from_pth.<locals>.<listcomp>u*   Removing reference to %s from .pth file %sc             S   s   g  |  ] } | r |  q S(    (    (   u   .0u   line(    (    u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu
   <listcomp>   s   	 u    %s file would be empty: deletingu   wbu.   Cannot find a reference to %s in any .pth file(   u	   pth_filesu   openu	   readlinesu   closeu   loggeru   infou   display_pathu   simulateu   osu   unlinku
   writelinesu   warn(   u   selfu   filenameu   pthu   fu   linesu	   new_lines(    (   u   filenameu)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu   remove_filename_from_pth   s$    
			u#   ZipCommand.remove_filename_from_pthc             C   s   t  j j |  } | d } | |  j   k rH t j d t |   n  |  j s t  j j |  r t	 |  } | j
   } | j   | r | d j d  r | d d 7<n  | j | d  n | d g } t	 | d  } | j |  | j   n  d  S(   Nu   .pthu.   Adding .pth file %s, but it is not on sys.pathi   u   
u   wbii(   u   osu   pathu   dirnameu   pathsu   loggeru   warnu   display_pathu   simulateu   existsu   openu	   readlinesu   closeu   endswithu   appendu
   writelines(   u   selfu   filenameu   pathu   destu   fu   lines(    (    u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu   add_filename_to_pth   s     
	
u   ZipCommand.add_filename_to_pthc             c   s   x |  j    D]r } t j j |  s t j j |  r? q n  x= t j |  D], } | j d  rO t j j | |  VqO qO Wq Wd  S(   Nu   .pth(   u   pathsu   osu   pathu   existsu   isdiru   listdiru   endswithu   join(   u   selfu   pathu   filename(    (    u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu	   pth_files  s    &u   ZipCommand.pth_filesc             C   s   x |  j    D] } t j j | |  } t j j |  rD | | f St j j |  r t j |  r t j | d  } y  | j	 t j j | d   Wn t
 k
 r Yn X| j   | | f S| j   q q Wt d |   d  S(   Nu   ru   __init__.pyu!   No package with the name %s found(   u   pathsu   osu   pathu   joinu   existsu   isdiru   zipfileu
   is_zipfileu   ZipFileu   readu   KeyErroru   closeu   InstallationError(   u   selfu   packageu   pathu   fullu   zip(    (    u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu   find_package  s    
" 

u   ZipCommand.find_packagec             C   sD  | r t  d   n  x(t |  j    D]} t j j |  sF q( n  t j j | j t j j   } t j j	 |  r t
 j |  r t j j |  |  j   k r( t j d t |   q( q( n  | d k r | d k r | j d d  j d  r q( n  t j d t |   t j d	 7_ g  } g  } zx t t j |   D] } t j j |  d
 j   } | d k rqKn  | d k rt j d t |   qKn  t j j | |  }	 t j j |	  r| j | |  j |	  f  qKt
 j |	  r| j |  qKt j d t |   qKW| rt j d  t j d	 7_ z" x | D] } t j |  qTWWd  t j d	 8_ Xn t j d  | r| j r| j d d d    n  t j d  t j d	 7_ z2 x+ | D]# \ } }
 t j d | |
 f  qWWd  t j d	 8_ Xn t j d  Wd  t j d	 8_ Xq( Wd  S(   Nu'   You cannot give an argument with --listu   Zipped egg: %su   site-packagesu   dist-packagesu   \u   /u
   lib/pythonu   In %s:i   i   u   .pthu	   .egg-infou	   .egg-linku   .pyu    Not displaying %s: not a packageu   Unknown file: %su   Zipped packages:u   No zipped packages.u   keyc             S   s	   |  d S(   Ni   (    (   u   x(    (    u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu   <lambda>L  s    u!   ZipCommand.list.<locals>.<lambda>u   Unzipped packages:u   %s  (%i files)u   No unzipped packages.(   u   .pthu	   .egg-infou	   .egg-link(   u   InstallationErroru   sortedu   pathsu   osu   pathu   existsu   basenameu   rstripu   sepu   isfileu   zipfileu
   is_zipfileu   dirnameu   loggeru   notifyu   display_pathu   replaceu   endswithu   indentu   listdiru   splitextu   loweru   infou   joinu   isdiru   appendu   count_packageu
   sort_filesu   sort(   u   selfu   optionsu   argsu   pathu   basenameu   zippedu   unzippedu   filenameu   extu   fullu   count(    (    u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu   list  sf    !!	u   ZipCommand.listc             C   sP   d } xC t  j |  D]2 \ } } } d d   | D } | t |  7} q W| S(   Ni    c             S   s+   g  |  ]! } | j    j d   s |  q S(   u   .pyc(   u   loweru   endswith(   u   .0u   f(    (    u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu
   <listcomp>\  s   	 u,   ZipCommand.count_package.<locals>.<listcomp>(   u   osu   walku   len(   u   selfu   pathu   totalu   dirpathu   dirnamesu	   filenames(    (    u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu   count_packageY  s
    u   ZipCommand.count_package(   u   __name__u
   __module__u   __qualname__u   __doc__u   nameu   usageu   summaryu   __init__u   pathsu   runu   unzip_packageu   zip_packageu   remove_filename_from_pthu   add_filename_to_pthu	   pth_filesu   find_packageu   listu   count_package(   u
   __locals__(    (   u	   __class__u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu
   ZipCommand   s   *3,;u
   ZipCommand(   u   sysu   reu   fnmatchu   osu   shutilu   zipfileu   pip.utilu   display_pathu
   backup_diru   rmtreeu   pip.logu   loggeru   pip.exceptionsu   InstallationErroru   pip.basecommandu   Commandu
   ZipCommand(    (    (    u)   /tmp/pip-zej_zi-build/pip/commands/zip.pyu   <module>   s   