summaryrefslogtreecommitdiff
path: root/numpy/distutils/command/config.py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-12-03 15:55:45 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-12-03 15:55:45 +0000
commitee27e9b6dbbfd8a0fce1cb638053efcbdc22eb3f (patch)
tree6ba4d15d38380033577366e21a544c9cb4e1961e /numpy/distutils/command/config.py
parenta3ac1f3c1641755d5ba724fdb25373eb37962bd4 (diff)
downloadnumpy-ee27e9b6dbbfd8a0fce1cb638053efcbdc22eb3f.tar.gz
Py3k: make config command py3k importable.
Diffstat (limited to 'numpy/distutils/command/config.py')
-rw-r--r--numpy/distutils/command/config.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/numpy/distutils/command/config.py b/numpy/distutils/command/config.py
index dbf8e77a1..28cf4cf9f 100644
--- a/numpy/distutils/command/config.py
+++ b/numpy/distutils/command/config.py
@@ -16,6 +16,7 @@ import distutils
from numpy.distutils.exec_command import exec_command
from numpy.distutils.mingw32ccompiler import generate_manifest
from numpy.distutils.command.autodist import check_inline, check_compiler_gcc4
+from numpy.distutils.compat import get_exception
LANG_EXT['f77'] = '.f'
LANG_EXT['f90'] = '.f90'
@@ -53,7 +54,8 @@ class config(old_config):
if not self.compiler.initialized:
try:
self.compiler.initialize()
- except IOError, e:
+ except IOError:
+ e = get_exception()
msg = """\
Could not initialize compiler instance: do you have Visual Studio
installed ? If you are trying to build with mingw, please use python setup.py
@@ -63,8 +65,8 @@ correctly installed, and the right version (VS 2008 for python 2.6, VS 2003 for
class was %s
============================================================================""" \
% (e, self.compiler.__class__.__name__)
- print """\
-============================================================================"""
+ print ("""\
+============================================================================""")
raise distutils.errors.DistutilsPlatformError(msg)
if not isinstance(self.fcompiler, FCompiler):
@@ -85,7 +87,8 @@ class was %s
self.compiler = self.fcompiler
try:
ret = mth(*((self,)+args))
- except (DistutilsExecError,CompileError),msg:
+ except (DistutilsExecError,CompileError):
+ msg = str(get_exception())
self.compiler = save_compiler
raise CompileError
self.compiler = save_compiler
@@ -188,7 +191,7 @@ int main() {
self._compile(body % {'type': type_name},
headers, include_dirs, 'c')
st = True
- except distutils.errors.CompileError, e:
+ except distutils.errors.CompileError:
st = False
finally:
self._clean()