diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-12-09 02:51:23 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-12-09 02:51:23 -0500 |
commit | 7cfeb0f5e3b4076ddbcd04beab1301e592dadeda (patch) | |
tree | 28f3f62e7eacf81515ea7de9fa2a233157092ec8 /setuptools/command/build_py.py | |
parent | 81af7af1c7a00465c1190714f233ad88c69e2e9f (diff) | |
download | python-setuptools-bitbucket-7cfeb0f5e3b4076ddbcd04beab1301e592dadeda.tar.gz |
Move import to top
Diffstat (limited to 'setuptools/command/build_py.py')
-rw-r--r-- | setuptools/command/build_py.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index f0d76705..43159c7c 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -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 ' |