£Á°è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>

f1  c               @   s   d  Z  d d l Z d d l Z d d l Z d d l m Z d d l m Z m Z d d l	 m
 Z
 Gd d   d  Z e j d d	  Z d
 d   Z d d d d d  Z d S(   us   distutils.filelist

Provides the FileList class, used for poking about the filesystem
and building lists of files.
i    N(   u   convert_path(   u   DistutilsTemplateErroru   DistutilsInternalError(   u   logc             B   s   |  Ee  Z d  Z d Z d d d d  Z d d   Z e j 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 d d d  Z d d d d d  Z d S(   u   FileListu  A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.

    Instance attributes:
      dir
        directory from which files will be taken -- only used if
        'allfiles' not supplied to constructor
      files
        list of filenames currently being built/filtered/manipulated
      allfiles
        complete list of files under consideration (ie. without any
        filtering applied)
    c             C   s   d  |  _ g  |  _ d  S(   N(   u   Noneu   allfilesu   files(   u   selfu   warnu   debug_print(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu   __init__   s    	u   FileList.__init__c             C   s   | |  _  d  S(   N(   u   allfiles(   u   selfu   allfiles(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu   set_allfiles"   s    u   FileList.set_allfilesc             C   s   t  |  |  _ d  S(   N(   u   findallu   allfiles(   u   selfu   dir(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu   findall%   s    u   FileList.findallc             C   s'   d d l  m } | r# t |  n  d S(   u~   Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        i    (   u   DEBUGN(   u   distutils.debugu   DEBUGu   print(   u   selfu   msgu   DEBUG(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu   debug_print(   s    u   FileList.debug_printc             C   s   |  j  j |  d  S(   N(   u   filesu   append(   u   selfu   item(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu   append2   s    u   FileList.appendc             C   s   |  j  j |  d  S(   N(   u   filesu   extend(   u   selfu   items(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu   extend5   s    u   FileList.extendc             C   sX   t  t t j j |  j   } g  |  _ x* | D]" } |  j j t j j |    q. Wd  S(   N(   u   sortedu   mapu   osu   pathu   splitu   filesu   appendu   join(   u   selfu   sortable_filesu
   sort_tuple(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu   sort8   s    	u   FileList.sortc             C   sY   xR t  t |  j  d d d  D]1 } |  j | |  j | d k r  |  j | =q  q  Wd  S(   Ni   i    i(   u   rangeu   lenu   files(   u   selfu   i(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu   remove_duplicatesB   s    &u   FileList.remove_duplicatesc             C   s:  | j    } | d } d  } } } | d k ru t |  d k  rU 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 rt |  d k rt d |   n  t | d
  } n t d |   | | | | f S(   Ni    u   includeu   excludeu   global-includeu   global-excludei   u&   '%s' expects <pattern1> <pattern2> ...c             S   s   g  |  ] } t  |   q S(    (   u   convert_path(   u   .0u   w(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu
   <listcomp>V   s   	 u1   FileList._parse_template_line.<locals>.<listcomp>i   u   recursive-includeu   recursive-excludei   u,   '%s' expects <dir> <pattern1> <pattern2> ...c             S   s   g  |  ] } t  |   q S(    (   u   convert_path(   u   .0u   w(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu
   <listcomp>\   s   	 u   graftu   pruneu#   '%s' expects a single <dir_pattern>u   unknown action '%s'(   u   includeu   excludeu   global-includeu   global-exclude(   u   recursive-includeu   recursive-exclude(   u   graftu   prune(   u   splitu   Noneu   lenu   DistutilsTemplateErroru   convert_path(   u   selfu   lineu   wordsu   actionu   patternsu   diru   dir_pattern(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu   _parse_template_lineK   s,    
	  u   FileList._parse_template_linec             C   s  |  j  |  \ } } } } | d k r} |  j d d j |   x| D]. } |  j | d d sH t j d |  qH qH Wn| d k r |  j d d j |   xs| D]. } |  j | d d s t j d	 |  q q Wn:| d
 k rA|  j d d j |   x| D]. } |  j | d d st j d |  qqWn| d k r|  j d d j |   x| D]. } |  j | d d snt j d |  qnqnWnv| d k r|  j d | d j |  f  xG| D]1 } |  j | d | st j d | |  qqWn| d k ry|  j d | d j |  f  x | D]1 } |  j | d | sAt j d | |  qAqAWn | d k r|  j d |  |  j d  d | st j d |  qnX | d k r	|  j d |  |  j d  d | st j d |  qn t d |   d  S(   Nu   includeu   include u    u   anchori   u%   warning: no files found matching '%s'u   excludeu   exclude u9   warning: no previously-included files found matching '%s'u   global-includeu   global-include i    u>   warning: no files found matching '%s' anywhere in distributionu   global-excludeu   global-exclude uR   warning: no previously-included files matching '%s' found anywhere in distributionu   recursive-includeu   recursive-include %s %su   prefixu:   warning: no files found matching '%s' under directory '%s'u   recursive-excludeu   recursive-exclude %s %suN   warning: no previously-included files matching '%s' found under directory '%s'u   graftu   graft u+   warning: no directories found matching '%s'u   pruneu   prune u6   no previously-included directories found matching '%s'u'   this cannot happen: invalid action '%s'(	   u   _parse_template_lineu   debug_printu   joinu   include_patternu   logu   warnu   exclude_patternu   Noneu   DistutilsInternalError(   u   selfu   lineu   actionu   patternsu   diru   dir_patternu   pattern(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu   process_template_lineg   sf    										u   FileList.process_template_linei   i    c             C   s   d } t | | | |  } |  j d | j  |  j d k rK |  j   n  xJ |  j D]? } | j |  rU |  j d |  |  j j	 |  d } qU qU 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, False otherwise.
        u%   include_pattern: applying regex r'%s'u    adding FNT(   u   Falseu   translate_patternu   debug_printu   patternu   allfilesu   Noneu   findallu   searchu   filesu   appendu   True(   u   selfu   patternu   anchoru   prefixu   is_regexu   files_foundu
   pattern_reu   name(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu   include_pattern   s    	u   FileList.include_patternc             C   s   d } t | | | |  } |  j d | j  xh t t |  j  d d d  D]G } | j |  j |  rO |  j d |  j |  |  j | =d } qO qO W| S(   u  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, False otherwise.
        u%   exclude_pattern: applying regex r'%s'i   u
    removing FiiT(	   u   Falseu   translate_patternu   debug_printu   patternu   rangeu   lenu   filesu   searchu   True(   u   selfu   patternu   anchoru   prefixu   is_regexu   files_foundu
   pattern_reu   i(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu   exclude_pattern   s    	&
u   FileList.exclude_patternN(   u   __name__u
   __module__u   __qualname__u   __doc__u   Noneu   __init__u   set_allfilesu   osu   curdiru   findallu   debug_printu   appendu   extendu   sortu   remove_duplicatesu   _parse_template_lineu   process_template_lineu   include_patternu   exclude_pattern(   u
   __locals__(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu   FileList   s   

	L,u   FileListc             C   s  d d l  m } m } m } m } g  } |  g } | j } | j } x | r |   }  t j |   }	 x |	 D] }
 |  t j	 k r t j
 j |  |
  } n |
 } t j  |  } | | } | |  r | j |  qk | |  rk | |  rk | |  qk qk WqF W| S(   u^   Find all files under 'dir' and return the list of full filenames
    (relative to 'dir').
    i    (   u   ST_MODEu   S_ISREGu   S_ISDIRu   S_ISLNK(   u   statu   ST_MODEu   S_ISREGu   S_ISDIRu   S_ISLNKu   popu   appendu   osu   listdiru   curdiru   pathu   join(   u   diru   ST_MODEu   S_ISREGu   S_ISDIRu   S_ISLNKu   listu   stacku   popu   pushu   namesu   nameu   fullnameu   statu   mode(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu   findall   s&    "					
u   findallc             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   patternu
   pattern_reu   sepu   escaped(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu
   glob_to_re  s    		
u
   glob_to_rei   c             C   s   | r) t  |  t  r" t j |   S|  Sn  |  r> t |   } n d } | d k	 r t d  } t |  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   Noneu   lenu   osu   sepu   join(   u   patternu   anchoru   prefixu   is_regexu
   pattern_reu   empty_patternu	   prefix_reu   sep(    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu   translate_pattern+  s"    		 u   translate_pattern(   u   __doc__u   osu   reu   fnmatchu   distutils.utilu   convert_pathu   distutils.errorsu   DistutilsTemplateErroru   DistutilsInternalErroru	   distutilsu   logu   FileListu   curdiru   findallu
   glob_to_reu   Noneu   translate_pattern(    (    (    u7   /opt/alt/python33/lib64/python3.3/distutils/filelist.pyu   <module>   s   