Workaround for Issue7511 did not run under Python 3.
diff --git a/setup.py b/setup.py
index 48d191c..0e092a0 100644
--- a/setup.py
+++ b/setup.py
@@ -48,9 +48,9 @@
build_ext.build_extension(self, ext)
except ext_errors:
raise BuildFailed()
- except ValueError, err:
- # may happen on Win 64 bit, see Python issue7511
- if "'path'" in str(err):
+ except ValueError:
+ # this can happen on Windows 64 bit, see Python issue 7511
+ if "'path'" in str(sys.exc_info()[1]): # works with Python 2 and 3
raise BuildFailed()
raise