diff options
author | David Cournapeau <cournape@gmail.com> | 2009-12-03 15:57:19 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2009-12-03 15:57:19 +0000 |
commit | d4b61015fa3f708901d0bda026864f8e77151540 (patch) | |
tree | 2b04ff5adb88d8206c27c586b3547511a3bde5aa /numpy | |
parent | 8a1ba33c12bb73543a7ee29a7ec67386e1967656 (diff) | |
download | numpy-d4b61015fa3f708901d0bda026864f8e77151540.tar.gz |
Py3k: make scons command py3k importable.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/distutils/command/scons.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/numpy/distutils/command/scons.py b/numpy/distutils/command/scons.py index 8fc46df96..d7bbec35e 100644 --- a/numpy/distutils/command/scons.py +++ b/numpy/distutils/command/scons.py @@ -13,6 +13,7 @@ from numpy.distutils.exec_command import find_executable from numpy.distutils import log from numpy.distutils.misc_util import is_bootstrapping, get_cmd from numpy.distutils.misc_util import get_numpy_include_dirs as _incdir +from numpy.distutils.compat import get_exception # A few notes: # - numscons is not mandatory to build numpy, so we cannot import it here. @@ -264,7 +265,8 @@ def check_numscons(minver): minver is a 3 integers tuple which defines the min version.""" try: import numscons - except ImportError, e: + except ImportError: + e = get_exception() raise RuntimeError("importing numscons failed (error was %s), using " \ "scons within distutils is not possible without " "this package " % str(e)) @@ -385,7 +387,8 @@ class scons(old_build_ext): distutils_compiler.initialize() self.scons_compiler = dist2sconscc(distutils_compiler) self.scons_compiler_path = protect_path(get_tool_path(distutils_compiler)) - except DistutilsPlatformError, e: + except DistutilsPlatformError: + e = get_exception() if not self._bypass_distutils_cc: raise e else: |