~ubuntu-branches/ubuntu/trusty/python-setuptools/trusty

« back to all changes in this revision

Viewing changes to setuptools/command/build_py.py

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-03-23 09:06:50 UTC
  • mfrom: (6.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20140323090650-34z89iscdcdob7ut
Tags: 3.3-1ubuntu1
Stop building for Python 3.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
 
168
168
        f = open(init_py,'rbU')
169
169
        if 'declare_namespace'.encode() not in f.read():
170
 
            from distutils import log
171
 
            log.warn(
172
 
                "WARNING: %s is a namespace package, but its __init__.py does\n"
173
 
                "not declare_namespace(); setuptools 0.7 will REQUIRE this!\n"
 
170
            from distutils.errors import DistutilsError
 
171
            raise DistutilsError(
 
172
                "Namespace package problem: %s is a namespace package, but its\n"
 
173
                "__init__.py does not call declare_namespace()! Please fix it.\n"
174
174
                '(See the setuptools manual under "Namespace Packages" for '
175
 
                "details.)\n", package
 
175
                "details.)\n" % (package,)
176
176
            )
177
177
        f.close()
178
178
        return init_py