diff options
| author | PJ Eby <distutils-sig@python.org> | 2005-12-15 02:45:03 +0000 |
|---|---|---|
| committer | PJ Eby <distutils-sig@python.org> | 2005-12-15 02:45:03 +0000 |
| commit | 26d527b956d3007a6f8fdca154e4f09246d06d45 (patch) | |
| tree | ed87402243ca1a75876e7a640bd983666ac2025c /setuptools/dist.py | |
| parent | 01332a6b16948504e4acd05f1d9f678abf4eb972 (diff) | |
| download | python-setuptools-bitbucket-26d527b956d3007a6f8fdca154e4f09246d06d45.tar.gz | |
Added the ``exclude_package_data`` keyword to ``setup()``, allowing you
to trim back files included via the ``package_data`` and
``include_package_data`` options.
Diffstat (limited to 'setuptools/dist.py')
| -rw-r--r-- | setuptools/dist.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py index 17c9f149..fb7df8ce 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -103,24 +103,24 @@ def check_test_suite(dist, attr, value): raise DistutilsSetupError("test_suite must be a string") +def check_package_data(dist, attr, value): + """Verify that value is a dictionary of package names to glob lists""" + if isinstance(value,dict): + for k,v in value.items(): + if not isinstance(k,str): break + try: iter(v) + except TypeError: + break + else: + return + raise DistutilsSetupError( + attr+" must be a dictionary mapping package names to lists of " + "wildcard patterns" + ) - - - - - - - - - - - - - - class Distribution(_Distribution): """Distribution with support for features, tests, and package data |
