[Python-Dev] Please give this patch for building bsddb a try

Skip Montanaro skip@pobox.com
Tue, 11 Jun 2002 11:22:08 -0500

If you build the bsddb module on a Unix-like system (that is, you use
configure and setup.py to build the interpreter and it attempts to build the
bsddb module), please give the new patch attached to


a try.  Ignore the subject of the patch.  I just tacked my patch onto this
item and assigned it to myself.  If/when the issue is settled I'll track
down and close other patches and bug reports related to building the bsddb

Briefly, it attempts the following:

  1. Makes it inconvenient (though certainly not impossible) to build/link
     with version 1 of the Berkeley DB library by commenting out the
     relevant part of the db_try_this dictionary in setup.py.

  2. Links the search for a DB library and corresponding include files so
     you don't find a version 2 include file and a version 3 library (for

  3. Attempts to do the same for the dbm module when it decides to link with
     the Berkeley DB library for compatibility (this is stuff under
     "development" and will almost certainly require further changes).  (You
     can ignore the debug print I forgot to remove before creating the
     patch. ;-)

I asked on c.l.py about where people have the Berkeley DB stuff installed so
I could tune the locations listed in db_try_this, but the thread almost
immediately went off into the weeds arguing about berkdb license issues.  I
therefore humbly request your more rational input on this topic.  If you
have a Unix-ish system and Berkeley DB is installed somewhere not listed in
the db_try_this dictionary in setup.py, please let me know.