????

Your IP : 18.217.155.228


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

U

�Qabs�@s�dZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZmZdd	lmZmZddlZdd
lmZddlmZmZddlmZdd
lm Z e!Z"ddddddddgZ#er�e#�$d�ej%j&Z&dZ'dZ(dgZ)Gdd�d�Z*Gdd�de*�Z+e*j,Z-e�r,e+j,Z.dd�Z/dd�Z0ej1j0je0_e �2ej1j3�Z4Gd d�de4�Z3d!d"�Z5ej6fd#d$�Z7e �8�dS)%z@Extensions to the 'distutils' for large or complex distributions�N)�DistutilsOptionError)�convert_path��fnmatchcase�)�SetuptoolsDeprecationWarning)�PY3�string_types)�filter�map)�	Extension)�Distribution�Feature)�Require)�monkey�setupr
r�Commandrrr�
find_packages�find_namespace_packagesTz
lib2to3.fixesc@sBeZdZdZeddd��Zedd��Zed	d
��Zedd��Z	d
S)�
PackageFinderzI
    Generate a list of all Python packages found within a directory
    �.���*cCs&t|�t|�|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�includerr�7/usr/lib/python3.8/site-packages/setuptools/__init__.py�find4s
�zPackageFinder.findccs�tj|dd�D]�\}}}|dd�}g|dd�<|D]d}tj�||�}	tj�|	|�}
|
�tjjd�}d|ks4|�|	�sxq4||�r�||�s�|V|�|�q4qdS)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)rr r!r"�root�dirs�filesZall_dirs�dir�	full_pathZrel_path�packagerrr#rKsz!PackageFinder._find_packages_itercCstj�tj�|d��S)z%Does a directory look like a package?z__init__.py)r'r)�isfiler*�r)rrr#r.gsz!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))�patNr)�.0r8��namerr#�	<genexpr>rsz@PackageFinder._build_filter.<locals>.<lambda>.<locals>.<genexpr>)�anyr:�Zpatternsr:r#�<lambda>r�z-PackageFinder._build_filter.<locals>.<lambda>rr>rr>r#rlszPackageFinder._build_filterN)rrr)
�__name__�
__module__�__qualname__�__doc__�classmethodr$r�staticmethodr.rrrrr#r/s

rc@seZdZedd��ZdS)�PEP420PackageFindercCsdS)NTrr7rrr#r.vsz'PEP420PackageFinder._looks_like_packageN)rArBrCrFr.rrrr#rGusrGcCs@tj�tdd�|��D���}|jdd�|jr<|�|j�dS)Ncss"|]\}}|dkr||fVqdS))Zdependency_links�setup_requiresNr)r9�k�vrrr#r<�s�z*_install_setup_requires.<locals>.<genexpr>T)Zignore_option_errors)�	distutils�corer
�dict�itemsZparse_config_filesrHZfetch_build_eggs)�attrs�distrrr#�_install_setup_requires�s�
rQcKst|�tjjf|�S�N)rQrKrLr)rOrrr#r�sc@s:eZdZejZdZdd�Zddd�Zdd�Zd
d
d�Z	dS)rFcKst�||�t|��|�dS)zj
        Construct the command for dist, updating
        vars(self) with any keyword parameters.
        N)�_Command�__init__�vars�update)�selfrP�kwrrr#rT�szCommand.__init__NcCsBt||�}|dkr"t|||�|St|t�s>td|||f��|S)Nz'%s' must be a %s (got `%s`))�getattr�setattr�
isinstancer	r)rW�optionZwhat�default�valrrr#�_ensure_stringlike�s

�zCommand._ensure_stringlikecCspt||�}|dkrdSt|t�r6t||t�d|��n6t|t�rTtdd�|D��}nd}|sltd||f��dS)z�Ensure that 'option' is a list of strings.  If 'option' is
        currently a string, we split it either on /,\s*/ or /\s+/, so
        "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
        ["foo", "bar", "baz"].
        Nz,\s*|\s+css|]}t|t�VqdSrR)r[r	)r9rJrrr#r<�sz-Command.ensure_string_list.<locals>.<genexpr>Fz''%s' must be a list of strings (got %r))	rYr[r	rZ�re�splitr�allr)rWr\r^�okrrr#�ensure_string_list�s


��zCommand.ensure_string_listrcKs t�|||�}t|��|�|SrR)rS�reinitialize_commandrUrV)rWZcommandZreinit_subcommandsrX�cmdrrr#re�szCommand.reinitialize_command)N)r)
rArBrCrSrDZcommand_consumes_argumentsrTr_rdrerrrr#r�s

cCs&dd�tj|dd�D�}ttjj|�S)z%
    Find all files under 'path'
    css,|]$\}}}|D]}tj�||�VqqdSrR)r'r)r*)r9�baser1r2�filerrr#r<�s�z#_find_all_simple.<locals>.<genexpr>Tr%)r'r(r
r)r6)r)�resultsrrr#�_find_all_simple�s�rjcCs6t|�}|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)	rjr'�curdir�	functools�partialr)r+rr)r3r2Zmake_relrrr#�findall�s


ro)9rDr'�sysrmZdistutils.corerKZdistutils.filelistr`Zdistutils.errorsrZdistutils.utilrZfnmatchrZ_deprecation_warningrZsetuptools.extern.sixrr	Zsetuptools.extern.six.movesr
rZsetuptools.versionZ
setuptoolsZsetuptools.extensionrZsetuptools.distr
rZsetuptools.dependsr�r�typeZ
__metaclass__�__all__r/�version�__version__Zbootstrap_install_fromZrun_2to3_on_doctestsZlib2to3_fixer_packagesrrGr$rrrQrrLZ
get_unpatchedrrSrjrlroZ	patch_allrrrr#�<module>s\�
F
2