
XJc           @   sH  d  Z  d d k l Z l Z d d k l Z l Z l Z d d k Z	 d d k
 Z d d k l Z d d k l Z d d k l Z d d k Z d Z d	 d
 d d d d d g Z e Z d Z e Z d g Z d d d  Z e	 i i Z e e  Z d e f d     YZ d d k Z	 e e	 i _ e i d  Z  d d k! Z	 e  e	 i" _  d S(   s@   Extensions to the 'distutils' for large or complex distributionsi(   t	   Extensiont   Library(   t   Distributiont   Featuret   _get_unpatchedN(   t   Require(   t   Command(   t   convert_paths   0.6t   setupR   R   R   R    R   t   find_packagess   lib2to3.fixest   .c         C   sJ  g  } t  |   d f g } x | o | i d  \ }  } x t i |   D] } t i i |  |  } d | j oe t i i |  oR t i i t i i | d   o0 | i | |  | i | | | d f  qJ qJ Wq Wxc t	 |  d d g D]K } d d k
 l } g  }	 | D]! }
 | |
 |  p |	 |
 qq~	 } q W| S(	   s  Return a list all Python packages found within directory 'where'

    'where' should be supplied as a "cross-platform" (i.e. URL-style) path; it
    will be converted to the appropriate local path syntax.  'exclude' is a
    sequence of package names to exclude; '*' can be used as a wildcard in the
    names, such that 'foo.*' will exclude all subpackages of 'foo' (but not
    'foo' itself).
    t    i    R
   s   __init__.pyt   ez_setupt   distribute_setupi(   t   fnmatchcase(   R   t   popt   ost   listdirt   patht   joint   isdirt   isfilet   appendt   listt   fnmatchR   (   t   wheret   excludet   outt   stackt   prefixt   namet   fnt   patR   t   _[1]t   item(    (    s7   /usr/lib/python2.6/dist-packages/setuptools/__init__.pyR	   !   s"    	   " ( 9c           B   s,   e  Z e i Z e Z d    Z d d  Z RS(   c         K   sA   t  i |  |  x* | i   D] \ } } t |  | |  q Wd  S(   N(   t   _Commandt   __init__t   itemst   setattr(   t   selft   distt   kwt   kt   v(    (    s7   /usr/lib/python2.6/dist-packages/setuptools/__init__.pyR$   B   s     i    c         K   sF   t  i |  | |  } x* | i   D] \ } } t | | |  q" W| S(   N(   R#   t   reinitialize_commandR%   R&   (   R'   t   commandt   reinit_subcommandsR)   t   cmdR*   R+   (    (    s7   /usr/lib/python2.6/dist-packages/setuptools/__init__.pyR,   H   s
     (   t   __name__t
   __module__R#   t   __doc__t   Falset   command_consumes_argumentsR$   R,   (    (    (    s7   /usr/lib/python2.6/dist-packages/setuptools/__init__.pyR   =   s   		c         C   s   g  } x t  i |   D] \ } } } | t  i j p | i t  i t  i  o | d } n | o4 g  } | D] } | t  i i | |  qo ~ } n | i t t  i i	 |   q W| S(   s^   Find all files under 'dir' and return the list of full filenames
    (relative to 'dir').
    i   (
   R   t   walkt   curdirt
   startswitht   sepR   R   t   extendt   filterR   (   t   dirt	   all_filest   baset   dirst   filesR!   t   f(    (    s7   /usr/lib/python2.6/dist-packages/setuptools/__init__.pyt   findallQ   s     *4 (    (#   R2   t   setuptools.extensionR    R   t   setuptools.distR   R   R   t   distutils.coret	   distutilst   setuptools.commandt
   setuptoolst   setuptools.dependsR   R   R#   t   distutils.utilR   t   os.pathR   t   __version__t   __all__t   Truet   _distributet   Nonet   bootstrap_install_fromt   run_2to3_on_doctestst   lib2to3_fixer_packagesR	   t   coreR   R6   RA   t   distutils.filelistt   filelist(    (    (    s7   /usr/lib/python2.6/dist-packages/setuptools/__init__.pyt   <module>   s.   	
	