Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r57899:35840dd84c57
Date: 2012-10-08 13:23 +0200
http://bitbucket.org/pypy/pypy/changeset/35840dd84c57/

Log:    This is still hopeless, but attempt to open all db-4.X for X in
        '56789'.

diff --git a/lib_pypy/dbm.py b/lib_pypy/dbm.py
--- a/lib_pypy/dbm.py
+++ b/lib_pypy/dbm.py
@@ -126,8 +126,11 @@
     libpath = ctypes.util.find_library('db')
     if not libpath:
         # XXX this is hopeless...
-        libpath = ctypes.util.find_library('db-4.5')
-        if not libpath:
+        for c in '56789':
+            libpath = ctypes.util.find_library('db-4.%s' % c)
+            if libpath:
+                break
+        else:
             raise ImportError("Cannot find dbm library")
     lib = CDLL(libpath) # Linux
     _platform = 'bdb'
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to