Skip to content

Commit a57b89b

Browse files
committed
Committing patch python#103216, autodetect of dbmmodule support and building
of dbmmodule dynamically by default (otherwise it can pull in dependencies with libdb that croak pybsddb3). This change moves the Setup line for dbmmodule to Setup.config.in.
1 parent e13be40 commit a57b89b

5 files changed

Lines changed: 484 additions & 341 deletions

File tree

Modules/Setup.config.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222

2323
# bsddb module enabled by --with-libdb or presence of db.h
2424
@USE_BSDDB_MODULE@bsddb bsddbmodule.c @HAVE_LIBDB@
25+
26+
# dbm(3) may require -lndbm or similar
27+
@USE_DBM_MODULE@dbm dbmmodule.c @HAVE_LIBNDBM@

Modules/Setup.dist

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,10 @@ new newmodule.c
355355
# implementation independent wrapper for these; dumbdbm.py provides
356356
# similar functionality (but slower of course) implemented in Python.
357357

358-
# The standard Unix dbm module:
358+
# The standard Unix dbm module has been moved to Setup.config so that
359+
# it will be compiled as a shared library by default. Compiling it as
360+
# a built-in module causes conflicts with the pybsddb3 module since it
361+
# creates a static dependency on an out-of-date version of db.so.
359362

360363
#dbm dbmmodule.c # dbm(3) may require -lndbm or similar
361364

config.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@
225225
/* Define if you want to use BSD db. */
226226
#undef WITH_LIBDB
227227

228+
/* Define if you want to use ndbm. */
229+
#undef WITH_LIBNDBM
230+
228231
/* Define if you want to produce an OpenStep/Rhapsody framework
229232
(shared library plus accessory files). */
230233
#undef WITH_NEXT_FRAMEWORK

0 commit comments

Comments
 (0)