Commit 2b2c7c76 authored by Jason R. Coombs's avatar Jason R. Coombs

Move import to top

parent d7b8b096
......@@ -6,6 +6,7 @@ import sys
import fnmatch
import textwrap
import io
import distutils.errors
try:
......@@ -162,9 +163,7 @@ class build_py(orig.build_py, Mixin2to3):
with io.open(init_py, 'rb') as f:
contents = f.read()
if b'declare_namespace' not in f.read():
from distutils.errors import DistutilsError
raise DistutilsError(
raise distutils.errors.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 '
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment