diff options
author | tarek <none@none> | 2009-11-01 15:01:40 +0100 |
---|---|---|
committer | tarek <none@none> | 2009-11-01 15:01:40 +0100 |
commit | f0464d99bbc4d5e5b7d0a244d5f96befdabd1273 (patch) | |
tree | f9d244d2b6f735520a2aacac580336135236b226 | |
parent | 04d0bff4b0a71390c6e9fba1191461dd29f6e191 (diff) | |
download | external_python_setuptools-f0464d99bbc4d5e5b7d0a244d5f96befdabd1273.tar.gz external_python_setuptools-f0464d99bbc4d5e5b7d0a244d5f96befdabd1273.tar.bz2 external_python_setuptools-f0464d99bbc4d5e5b7d0a244d5f96befdabd1273.zip |
backporting the API Eby added in 0.6c11
--HG--
branch : distribute
extra : rebase_source : 7e34c308ad98259f9344e10117750aeae3e8d2ea
-rw-r--r-- | setuptools/dist.py | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py index 2246ab96..fd4ca66b 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -1,5 +1,6 @@ __all__ = ['Distribution'] +import re from distutils.core import Distribution as _Distribution from setuptools.depends import Require from setuptools.command.install import install @@ -421,19 +422,19 @@ class Distribution(_Distribution): if self.packages: self.packages = [ p for p in self.packages - if p<>package and not p.startswith(pfx) + if p != package and not p.startswith(pfx) ] if self.py_modules: self.py_modules = [ p for p in self.py_modules - if p<>package and not p.startswith(pfx) + if p != package and not p.startswith(pfx) ] if self.ext_modules: self.ext_modules = [ p for p in self.ext_modules - if p.name<>package and not p.name.startswith(pfx) + if p.name != package and not p.name.startswith(pfx) ] @@ -805,22 +806,11 @@ class Feature: - - - - - - - - - - - - - - - - - - +def check_packages(dist, attr, value): + for pkgname in value: + if not re.match(r'\w+(\.\w+)*', pkgname): + distutils.log.warn( + "WARNING: %r not a valid package name; please use only" + ".-separated package names in setup.py", pkgname + ) |