Package turbogears :: Module finddata

Module finddata

source code

Functions
 
find_package_data(where='.', package='', exclude=standard_exclude, exclude_directories=standard_exclude_directories, only_in_packages=True, show_ignored=False)
Return a dictionary suitable for use in ``package_data`` in a distutils ``setup.py`` file.
source code
Variables
  standard_exclude = '*.py', '*.pyc', '*~', '.*', '*.bak', '*.swp*'
  standard_exclude_directories = '.*', 'CVS', '_darcs', './build...
Function Details

find_package_data(where='.', package='', exclude=standard_exclude, exclude_directories=standard_exclude_directories, only_in_packages=True, show_ignored=False)

source code 

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``, ``_darcs``, ``./build``, ``.dist``, ``EGG-INFO`` and ``*.egg-info`` 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.


Variables Details

standard_exclude_directories

Value:
'.*', 'CVS', '_darcs', './build', './dist', 'EGG-INFO', '*.egg-info'