File: //opt/alt/python37/lib/python3.7/site-packages/paste/util/__pycache__/finddata.cpython-37.pyc
B
b�N � @ sj d dl Z d dlZd dlmZ d dlmZ dZdZddeedd fd
d�Ze dkrfd dl
Z
e
�
edd
�� dS )� N)�fnmatchcase)�convert_path)z*.pyz*.pycz
*$py.classz*~z.*z*.bak)z.*�CVS�_darcsz./buildz./distzEGG-INFOz
*.egg-info�.� TFc C s� i }t | �d||fg}�x~|�r�|�d�\} }}}�x^t�| �D �]N} tj�| | �}
tj�|
��rd}xF|D ]>}t| |�s�|
�� |�� krld}|r�t t
j? d|
|f f P qlW |r�q@tj�tj�|
d��r�|s�|s�| }
n|d | }
|�
|
d|
df� n|�
|
|| d ||f� q@|�s|s@d}xN|D ]F}t| |��sJ|
�� |�� k�r(d}|�rjt t
j? d |
|f f P �q(W |�rzq@|�|g ��
|| � q@W qW |S )
aj
Return a dictionary suitable for use in ``package_data``
in a distutils ``setup.py`` file.
The dictionary looks like::
{'package': [files]}
Where ``files`` is a list of all the files in that package that
don't match anything in ``exclude``.
If ``only_in_packages`` is true, then top-level directories that
are not packages won't be included (but directories under packages
will).
Directories matching any pattern in ``exclude_directories`` will
be ignored; by default directories with leading ``.``, ``CVS``,
and ``_darcs`` will be ignored.
If ``show_ignored`` is true, then all the files that aren't
included in package data are shown on stderr (for debugging
purposes).
Note patterns use wildcards, or can be exact paths (including
leading ``./``), and all searching is case-insensitive.
r r FTz"Directory %s ignored by pattern %sz__init__.pyr �/zFile %s ignored by pattern %s)r �pop�os�listdir�path�join�isdirr �lower�print�sys�stderr�isfile�append�
setdefault)�where�package�exclude�exclude_directories�only_in_packages�show_ignored�out�stack�prefix�name�fn�bad_name�pattern�new_package� r$ �D/opt/alt/python37/lib/python3.7/site-packages/paste/util/finddata.py�find_package_data sR !
r&