????

Your IP : 18.217.155.228


Current Path : /lib/python3.6/site-packages/setuptools/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/setuptools/__pycache__/__init__.cpython-36.pyc

3

U('dD�@s2dZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZmZddl
ZddlmZddlmZmZddlmZd	d
lmZddd
ddddgZejjZdZdZdgZGdd�de�ZGdd�de�Z ej!Z"dd�Z#dd�Z$ej%j$je$_ej&ej%j'�Z(Gdd�de(�Z'dd�Z)ej*fdd�Z+ej,�dS) z@Extensions to the 'distutils' for large or complex distributions�N)�convert_path)�fnmatchcase)�filter�map)�	Extension)�Distribution�Feature)�Require�)�monkey�setuprr�Commandrr	�
find_packagesTz
lib2to3.fixesc@sHeZdZdZedfd
fdd��Zedd��Zedd	��Zed
d��Z	dS)�
PackageFinderzI
    Generate a list of all Python packages found within a directory
    �.�*cCs&t|jt|�|jd|��|j|���S)a	Return a list all Python packages found within directory 'where'

        'where' is the root directory which will be searched for packages.  It
        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).

        'include' is a sequence of package names to include.  If it's
        specified, only the named packages will be included.  If it's not
        specified, all found packages will be included.  'include' can contain
        shell style wildcard patterns just like 'exclude'.
        �ez_setup�*__pycache__)rr)�list�_find_packages_iterr�
_build_filter)�cls�where�exclude�include�r�/usr/lib/python3.6/__init__.py�find'szPackageFinder.findccs�x�tj|dd�D]�\}}}|dd�}g|dd�<xp|D]h}tjj||�}	tjj|	|�}
|
jtjjd�}d|ks8|j|	�r~q8||�r�||�r�|V|j|�q8WqWdS)zy
        All the packages found in 'where' that pass the 'include' filter, but
        not the 'exclude' filter.
        T)�followlinksNr)	�os�walk�path�join�relpath�replace�sep�_looks_like_package�append)rrrr�root�dirs�filesZall_dirs�dir�	full_pathZrel_path�packagerrrr>s
z!PackageFinder._find_packages_itercCstjjtjj|d��S)z%Does a directory look like a package?z__init__.py)rr!�isfiler")r!rrrr&Zsz!PackageFinder._looks_like_packagecs�fdd�S)z�
        Given a list of patterns, return a callable that will be true only if
        the input matches at least one of the patterns.
        cst�fdd��D��S)Nc3s|]}t�|d�VqdS))�patN)r)�.0r/)�namerr�	<genexpr>esz@PackageFinder._build_filter.<locals>.<lambda>.<locals>.<genexpr>)�any)r1)�patterns)r1r�<lambda>esz-PackageFinder._build_filter.<locals>.<lambda>r)r4r)r4rr_szPackageFinder._build_filterN)r)
�__name__�
__module__�__qualname__�__doc__�classmethodrr�staticmethodr&rrrrrr"src@seZdZedd��ZdS)�PEP420PackageFindercCsdS)NTr)r!rrrr&isz'PEP420PackageFinder._looks_like_packageN)r6r7r8r;r&rrrrr<hsr<cCs@tjjtdd�|j�D���}|jdd�|jr<|j|j�dS)Ncss"|]\}}|dkr||fVqdS)�dependency_links�setup_requiresN)r=r>r)r0�k�vrrrr2usz*_install_setup_requires.<locals>.<genexpr>T)Zignore_option_errors)�	distutils�corer�dict�itemsZparse_config_filesr>Zfetch_build_eggs)�attrs�distrrr�_install_setup_requiresqs
rGcKst|�tjjf|�S)N)rGrArBr)rErrrr~sc@s(eZdZejZdZdd�Zddd�ZdS)	r
FcKstj||�t|�j|�dS)zj
        Construct the command for dist, updating
        vars(self) with any keyword parameters.
        N)�_Command�__init__�vars�update)�selfrF�kwrrrrI�szCommand.__init__rcKs tj|||�}t|�j|�|S)N)rH�reinitialize_commandrJrK)rLZcommandZreinit_subcommandsrM�cmdrrrrN�szCommand.reinitialize_commandN)r)r6r7r8rHr9Zcommand_consumes_argumentsrIrNrrrrr
�scCs&dd�tj|dd�D�}ttjj|�S)z%
    Find all files under 'path'
    css,|]$\}}}|D]}tjj||�VqqdS)N)rr!r")r0�baser)r*�filerrrr2�sz#_find_all_simple.<locals>.<genexpr>T)r)rr rr!r.)r!�resultsrrr�_find_all_simple�srScCs6t|�}|tjkr.tjtjj|d�}t||�}t|�S)z�
    Find all files under 'dir' and return the list of full filenames.
    Unless dir is '.', return full filenames with dir prepended.
    )�start)	rSr�curdir�	functools�partialr!r#rr)r+r*Zmake_relrrr�findall�s


rX)-r9rrVZdistutils.corerAZdistutils.filelistZdistutils.utilrZfnmatchrZsetuptools.extern.six.movesrrZsetuptools.versionZ
setuptoolsZsetuptools.extensionrZsetuptools.distrrZsetuptools.dependsr	�r�__all__�version�__version__Zbootstrap_install_fromZrun_2to3_on_doctestsZlib2to3_fixer_packages�objectrr<rrrGrrBZ
get_unpatchedr
rHrSrUrXZ	patch_allrrrr�<module>s:F