diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2016-10-19 15:33:04 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-10-19 15:33:04 -0400 |
| commit | bbf6ac250a05fd51aa2a44ed3196837491bc9d60 (patch) | |
| tree | 466099ad3f7900fdd624a12c8d555249bd7a8829 | |
| parent | 2f80e3dbfbac6682bf71aba14ba03dad73bed717 (diff) | |
| download | python-setuptools-git-bbf6ac250a05fd51aa2a44ed3196837491bc9d60.tar.gz | |
Ensure that namespace packages are implicitly declared as packages. Ref #97.
| -rw-r--r-- | CHANGES.rst | 6 | ||||
| -rw-r--r-- | setuptools/dist.py | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 47164e09..400e9094 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v28.7.1 +------- + +* #97: Declaring a namespace package implicitly also + declares the package. + v28.6.1 ------- diff --git a/setuptools/dist.py b/setuptools/dist.py index 612040c8..8058ee7c 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -104,9 +104,17 @@ def assert_string_list(dist, attr, value): def check_nsp(dist, attr, value): - """Verify that namespace packages are valid""" + """ + Verify that namespace packages are valid and ensure that any + namespace packages imply a package. + """ ns_packages = value assert_string_list(dist, attr, ns_packages) + dist.packages = dist.packages or [] + dist.packages.extend( + package for package in ns_packages + if package not in dist.packages + ) for nsp in ns_packages: if not dist.has_contents_for(nsp): raise DistutilsSetupError( |
