[pypy-commit] pypy default: convert VerificationError to ImportError
mattip
noreply at buildbot.pypy.org
Fri May 16 11:13:10 CEST 2014
Author: mattip <matti.picus at gmail.com>
Branch:
Changeset: r71538:e4355950858a
Date: 2014-05-16 12:12 +0300
http://bitbucket.org/pypy/pypy/changeset/e4355950858a/
Log: convert VerificationError to ImportError
diff --git a/lib_pypy/gdbm.py b/lib_pypy/gdbm.py
--- a/lib_pypy/gdbm.py
+++ b/lib_pypy/gdbm.py
@@ -36,9 +36,15 @@
void free(void*);
''')
-lib = ffi.verify('''
-#include "gdbm.h"
-''', libraries=['gdbm'])
+try:
+ lib = ffi.verify('''
+ #include "gdbm.h"
+ ''', libraries=['gdbm'])
+except cffi.VerificationError as e:
+ # distutils does not preserve the actual message,
+ # but the verification is simple enough that the
+ # failure must be due to missing gdbm dev libs
+ raise ImportError('%s: %s' %(e.__class__.__name__, e))
class error(Exception):
pass
More information about the pypy-commit
mailing list