ó
OyTLc           @   s  d  Z  d d l m Z m Z d d l m Z m Z m 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 d l Z d d l 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	 j j Z e e  Z d e f d     YZ d d l Z	 e e	 j _ e j d  Z  d d l! Z	 e  e	 j" _  e# e d  rhe j$ se# e d  re j% j& d  re Z' n e( Z' 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   s7  g  } t  |   d f g } xź | rŮ | j d  \ }  } x t j |   D] } t j j |  |  } d | k rI t j j |  rI t j j t j j | d   rI | j | |  | j | | | d f  qI qI Wq WxV t	 |  d d g D]> } d d l
 m } g  | D] }	 | |	 |  s|	 ^ 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   item(    (    s7   /usr/lib/python2.7/dist-packages/setuptools/__init__.pyR	   #   s    		! &,c           B   s,   e  Z e j Z e Z d    Z d d  Z RS(   c         K   sA   t  j |  |  x* | j   D] \ } } t |  | |  q Wd  S(   N(   t   _Commandt   __init__t   itemst   setattr(   t   selft   distt   kwt   kt   v(    (    s7   /usr/lib/python2.7/dist-packages/setuptools/__init__.pyR#   D   s    i    c         K   sF   t  j |  | |  } x* | j   D] \ } } t | | |  q" W| S(   N(   R"   t   reinitialize_commandR$   R%   (   R&   t   commandt   reinit_subcommandsR(   t   cmdR)   R*   (    (    s7   /usr/lib/python2.7/dist-packages/setuptools/__init__.pyR+   J   s    (   t   __name__t
   __module__R"   t   __doc__t   Falset   command_consumes_argumentsR#   R+   (    (    (    s7   /usr/lib/python2.7/dist-packages/setuptools/__init__.pyR   ?   s   		c         C   sŻ   g  } x˘ t  j |   D] \ } } } | t  j k sM | j t  j t  j  rZ | d } n  | r g  | D] } t  j j | |  ^ qg } n  | j t t  j j	 |   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   filest   f(    (    s7   /usr/lib/python2.7/dist-packages/setuptools/__init__.pyt   findallS   s    (+ t   dont_write_bytecodet   PYTHONDONTWRITEBYTECODE(    ()   R1   t   setuptools.extensionR    R   t   setuptools.distR   R   R   t   distutils.coret	   distutilst   setuptools.commandt
   setuptoolst   setuptools.dependsR   R   R"   t   distutils.utilR   R   t   syst   __version__t   __all__t   Truet   _distributet   Nonet   bootstrap_install_fromt   run_2to3_on_doctestst   lib2to3_fixer_packagesR	   t   coreR   R5   R@   t   distutils.filelistt   filelistt   hasattrRA   t   environt   gett   _dont_write_bytecodeR2   (    (    (    s7   /usr/lib/python2.7/dist-packages/setuptools/__init__.pyt   <module>   s8   		"	