£Á°è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>

7Re4  c               @   s   d  Z  d d l Z d d l 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 g Z e j e  Z e j d e j  Z e j d	 e j e j B Z Gd
 d   d e  Z d S(   uu   
Class representing the list of files in a distribution.

Equivalent to distutils.filelist, but fixes some problems.
i    Ni   (   u   DistlibException(   u   fsdecode(   u   convert_pathu   Manifestu   \\w*
u   #.*?(?=
)|
(?=$)c             B   s   |  Ee  Z d  Z d Z d d d  Z d d   Z d d   Z d d	   Z d d
 d  Z
 d d   Z d d   Z d d   Z d d d d d  Z d d d d d  Z d d d d d  Z d d   Z d S(   u   Manifestu~   A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.
    c             C   sY   t  j j t  j j | p! t  j     |  _ |  j t  j |  _ d |  _	 t
   |  _ d S(   ud   
        Initialise an instance.

        :param base: The base directory to explore under.
        N(   u   osu   pathu   abspathu   normpathu   getcwdu   baseu   sepu   prefixu   Noneu   allfilesu   setu   files(   u   selfu   base(    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu   __init__#   s    -	u   Manifest.__init__c             C   s   d d l  m } m } m } g  |  _ } |  j } | g } | j } | j } x | r |   } t j	 |  }	 x |	 D]{ }
 t j
 j | |
  } t j  |  } | j } | |  r | j t |   qu | |  ru | |  ru | |  qu qu WqP Wd S(   um   Find all files under the base and set ``allfiles`` to the absolute
        pathnames of files found.
        i    (   u   S_ISREGu   S_ISDIRu   S_ISLNKN(   u   statu   S_ISREGu   S_ISDIRu   S_ISLNKu   allfilesu   baseu   popu   appendu   osu   listdiru   pathu   joinu   st_modeu   fsdecode(   u   selfu   S_ISREGu   S_ISDIRu   S_ISLNKu   allfilesu   rootu   stacku   popu   pushu   namesu   nameu   fullnameu   statu   mode(    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu   findall2   s"    							u   Manifest.findallc             C   sM   | j  |  j  s- t j j |  j |  } n  |  j j t j j |   d S(   uz   
        Add a file to the manifest.

        :param item: The pathname to add. This can be relative to the base.
        N(	   u
   startswithu   prefixu   osu   pathu   joinu   baseu   filesu   addu   normpath(   u   selfu   item(    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu   addM   s    u   Manifest.addc             C   s"   x | D] } |  j  |  q Wd S(   u   
        Add a list of files to the manifest.

        :param items: The pathnames to add. These can be relative to the base.
        N(   u   add(   u   selfu   itemsu   item(    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu   add_manyW   s    u   Manifest.add_manyc                s      f d d     t   j  } | rj t    } x' | D] }   | t j j |   q: W| | O} n  d d   t d d   | D  D S(   u8   
        Return sorted files in directory order
        c                sj   |  j  |  t j d |  |  j k rf t j j |  \ } } | d k sV t    |  |  n  d  S(   Nu   add_dir added %su    u   /(   u    u   /(   u   addu   loggeru   debugu   baseu   osu   pathu   splitu   AssertionError(   u   dirsu   du   parentu   _(   u   add_diru   self(    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu   add_dire   s    u    Manifest.sorted.<locals>.add_dirc             S   s"   g  |  ] } t  j j |    q S(    (   u   osu   pathu   join(   u   .0u
   path_tuple(    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu
   <listcomp>s   s   	 u#   Manifest.sorted.<locals>.<listcomp>c             s   s!   |  ] } t  j j |  Vq d  S(   N(   u   osu   pathu   split(   u   .0u   path(    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu	   <genexpr>t   s    u"   Manifest.sorted.<locals>.<genexpr>(   u   setu   filesu   osu   pathu   dirnameu   sorted(   u   selfu   wantdirsu   resultu   dirsu   f(    (   u   add_diru   selfu5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu   sorted`   s    		u   Manifest.sortedc             C   s   t    |  _ g  |  _ d S(   u   Clear all collected files.N(   u   setu   filesu   allfiles(   u   self(    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu   clearv   s    u   Manifest.clearc             C   sS  |  j  |  \ } } } } | d k rc x%| D]. } |  j | d d s. t j d |  q. q. Wn| d k r x| D]. } |  j | d d sv t j d |  qv qv Wn| d k r x| D]. } |  j | d d s t j d |  q q Wn\| d k r;xM| D]. } |  j | d d st j d	 |  qqWn| d
 k rx| D]1 } |  j | d | sNt j d | |  qNqNWn | d k rx | D]1 } |  j | d | st j d | |  qqWn~ | d k r|  j d d | sOt j d |  qOnG | d k r?|  j d d | sOt j d |  qOn t d |   d S(   uv  
        Process a directive which either adds some files from ``allfiles`` to
        ``files``, or removes some files from ``files``.

        :param directive: The directive to process. This should be in a format
                     compatible with distutils ``MANIFEST.in`` files:

                     http://docs.python.org/distutils/sourcedist.html#commands
        u   includeu   anchoru   no files found matching %ru   excludeu.   no previously-included files found matching %ru   global-includeu3   no files found matching %r anywhere in distributionu   global-excludeuG   no previously-included files matching %r found anywhere in distributionu   recursive-includeu   prefixu-   no files found matching %r under directory %ru   recursive-excludeuA   no previously-included files matching %r found under directory %ru   graftu    no directories found matching %ru   pruneu4   no previously-included directories found matching %ru   invalid action %rNTF(	   u   _parse_directiveu   _include_patternu   Trueu   loggeru   warningu   _exclude_patternu   Falseu   Noneu   DistlibException(   u   selfu	   directiveu   actionu   patternsu   thediru
   dirpatternu   pattern(    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu   process_directive{   sP    							u   Manifest.process_directivec          
   C   so  | j    } t |  d k rA | d d k rA | j d d  n  | d } d } } } | d k r t |  d k  r t d |   n  d d   | d d  D } n | d k rt |  d k  r t d |   n  t | d  } d d   | d d  D } nT | d k rOt |  d k r<t d |   n  t | d  } n t d |   | | | | f S(   u   
        Validate a directive.
        :param directive: The directive to validate.
        :return: A tuple of action, patterns, thedir, dir_patterns
        i   i    u   includeu   excludeu   global-includeu   global-excludeu   recursive-includeu   recursive-excludeu   graftu   prunei   u$   %r expects <pattern1> <pattern2> ...c             S   s   g  |  ] } t  |   q S(    (   u   convert_path(   u   .0u   word(    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu
   <listcomp>   s   	 u-   Manifest._parse_directive.<locals>.<listcomp>Ni   u*   %r expects <dir> <pattern1> <pattern2> ...c             S   s   g  |  ] } t  |   q S(    (   u   convert_path(   u   .0u   word(    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu
   <listcomp>   s   	 u!   %r expects a single <dir_pattern>u   unknown action %r(   u   includeu   excludeu   global-includeu   global-excludeu   recursive-includeu   recursive-excludeu   graftu   prune(   u   includeu   excludeu   global-includeu   global-exclude(   u   recursive-includeu   recursive-exclude(   u   graftu   prune(   u   splitu   lenu   insertu   Noneu   DistlibExceptionu   convert_path(   u   selfu	   directiveu   wordsu   actionu   patternsu   thediru   dir_pattern(    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu   _parse_directive   s:        	
	  u   Manifest._parse_directivec             C   sz   d } |  j | | | |  } |  j d k r: |  j   n  x9 |  j D]. } | j |  rD |  j j |  d } qD qD W| S(   u  Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.

        Patterns are not quite the same as implemented by the 'fnmatch'
        module: '*' and '?'  match non-special characters, where "special"
        is platform-dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return True if files are found.
        FNT(	   u   Falseu   _translate_patternu   allfilesu   Noneu   findallu   searchu   filesu   addu   True(   u   selfu   patternu   anchoru   prefixu   is_regexu   foundu
   pattern_reu   name(    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu   _include_pattern   s    u   Manifest._include_patternc             C   sd   d } |  j | | | |  } x? t |  j  D]. } | j |  r. |  j j |  d } q. q. W| S(   ut  Remove strings (presumably filenames) from 'files' that match
        'pattern'.

        Other parameters are the same as for 'include_pattern()', above.
        The list 'self.files' is modified in place. Return True if files are
        found.

        This API is public to allow e.g. exclusion of SCM subdirs, e.g. when
        packaging source distributions
        FT(   u   Falseu   _translate_patternu   listu   filesu   searchu   removeu   True(   u   selfu   patternu   anchoru   prefixu   is_regexu   foundu
   pattern_reu   f(    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu   _exclude_pattern  s    u   Manifest._exclude_patternc       
      C   s  | r) t  | t  r" t j |  S| Sn  | rA |  j |  } n d } t j t j j |  j	 d   } | d k	 r |  j d  } |  j |  d t |   } t j }	 t j d k r d }	 n  d | |	 j | d | f  } n | r d | | } n  t j |  S(   u  Translate a shell-like wildcard pattern to a compiled regular
        expression.

        Return the compiled regex.  If 'is_regex' true,
        then 'pattern' is directly compiled to a regex (if it's a string)
        or just returned as-is (assumes it's a regex object).
        u    Nu   \u   \\u   ^u   .*(   u
   isinstanceu   stru   reu   compileu   _glob_to_reu   escapeu   osu   pathu   joinu   baseu   Noneu   lenu   sep(
   u   selfu   patternu   anchoru   prefixu   is_regexu
   pattern_reu   baseu   empty_patternu	   prefix_reu   sep(    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu   _translate_pattern3  s&    	! 		u   Manifest._translate_patternc             C   sS   t  j |  } t j } t j d k r0 d } n  d | } t j d | |  } | S(   u   Translate a shell-like glob pattern to a regular expression.

        Return a string containing the regex.  Differs from
        'fnmatch.translate()' in that '*' does not match "special characters"
        (which are platform-specific).
        u   \u   \\\\u   \1[^%s]u   ((?<!\\)(\\\\)*)\.(   u   fnmatchu	   translateu   osu   sepu   reu   sub(   u   selfu   patternu
   pattern_reu   sepu   escaped(    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu   _glob_to_reW  s    		
u   Manifest._glob_to_reNFT(   u   __name__u
   __module__u   __qualname__u   __doc__u   Noneu   __init__u   findallu   addu   add_manyu   Falseu   sortedu   clearu   process_directiveu   _parse_directiveu   Trueu   _include_patternu   _exclude_patternu   _translate_patternu   _glob_to_re(   u
   __locals__(    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu   Manifest   s    
	L/(#(   u   __doc__u   fnmatchu   loggingu   osu   reu    u   DistlibExceptionu   compatu   fsdecodeu   utilu   convert_pathu   __all__u	   getLoggeru   __name__u   loggeru   compileu   Mu   _COLLAPSE_PATTERNu   Su   _COMMENTED_LINEu   objectu   Manifest(    (    (    u5   /tmp/pip-zej_zi-build/pip/_vendor/distlib/manifest.pyu   <module>
   s   	