File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313from numpy .distutils import log
1414from numpy .distutils .misc_util import is_bootstrapping , get_cmd
1515from 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 :
You can’t perform that action at this time.
0 commit comments