Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d4b6101

Browse files
committed
Py3k: make scons command py3k importable.
1 parent 8a1ba33 commit d4b6101

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

numpy/distutils/command/scons.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from numpy.distutils import log
1414
from numpy.distutils.misc_util import is_bootstrapping, get_cmd
1515
from numpy.distutils.misc_util import get_numpy_include_dirs as _incdir
16+
from numpy.distutils.compat import get_exception
1617

1718
# A few notes:
1819
# - numscons is not mandatory to build numpy, so we cannot import it here.
@@ -264,7 +265,8 @@ def check_numscons(minver):
264265
minver is a 3 integers tuple which defines the min version."""
265266
try:
266267
import numscons
267-
except ImportError, e:
268+
except ImportError:
269+
e = get_exception()
268270
raise RuntimeError("importing numscons failed (error was %s), using " \
269271
"scons within distutils is not possible without "
270272
"this package " % str(e))
@@ -385,7 +387,8 @@ def _init_ccompiler(self, compiler_type):
385387
distutils_compiler.initialize()
386388
self.scons_compiler = dist2sconscc(distutils_compiler)
387389
self.scons_compiler_path = protect_path(get_tool_path(distutils_compiler))
388-
except DistutilsPlatformError, e:
390+
except DistutilsPlatformError:
391+
e = get_exception()
389392
if not self._bypass_distutils_cc:
390393
raise e
391394
else:

0 commit comments

Comments
 (0)