aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/build_py.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2006-04-14 19:13:24 +0000
committerPJ Eby <distutils-sig@python.org>2006-04-14 19:13:24 +0000
commit52dcb6d1c888a4a7a047f380783f572055a175dc (patch)
treee7f74685afa9a96c1c8b6658f2bba093b66813d6 /setuptools/command/build_py.py
parent2fbffe9bf4bf6c71c5bbe94e3386d69a2db5f37c (diff)
downloadexternal_python_setuptools-52dcb6d1c888a4a7a047f380783f572055a175dc.tar.gz
external_python_setuptools-52dcb6d1c888a4a7a047f380783f572055a175dc.tar.bz2
external_python_setuptools-52dcb6d1c888a4a7a047f380783f572055a175dc.zip
Don't eagerly import namespace packages. This was the big reason for
branching to 0.7 now, as I wanted this wart gone before anything went into Python 2.5. But it's gone now, yay! --HG-- extra : source : f3c5c19842064dd4a497baef0171aac54464a484 extra : amend_source : 3f79e71eedfc5f37a1813967bb53cf9d92a11919
Diffstat (limited to 'setuptools/command/build_py.py')
-rw-r--r--setuptools/command/build_py.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py
index 090b44d2..1efabc02 100644
--- a/setuptools/command/build_py.py
+++ b/setuptools/command/build_py.py
@@ -167,12 +167,12 @@ class build_py(_build_py, Mixin2to3):
f = open(init_py,'rbU')
if 'declare_namespace'.encode() not in f.read():
- from distutils import log
- log.warn(
- "WARNING: %s is a namespace package, but its __init__.py does\n"
- "not declare_namespace(); setuptools 0.7 will REQUIRE this!\n"
+ from distutils.errors import DistutilsError
+ raise DistutilsError(
+ "Namespace package problem: %s is a namespace package, but its\n"
+ "__init__.py does not call declare_namespace()! Please fix it.\n"
'(See the setuptools manual under "Namespace Packages" for '
- "details.)\n", package
+ "details.)\n" % (package,)
)
f.close()
return init_py