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 | d989230127c6e16c505096f6150db977e61478b3 (patch) | |
tree | ed87402243ca1a75876e7a640bd983666ac2025c /setuptools/dist.py | |
parent | 1b77dd8e7845b5ac38fc7367796290dd65b8c531 (diff) | |
download | external_python_setuptools-d989230127c6e16c505096f6150db977e61478b3.tar.gz external_python_setuptools-d989230127c6e16c505096f6150db977e61478b3.tar.bz2 external_python_setuptools-d989230127c6e16c505096f6150db977e61478b3.zip |
Added the ``exclude_package_data`` keyword to ``setup()``, allowing you
to trim back files included via the ``package_data`` and
``include_package_data`` options.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041693
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 |