How to merge a module into a package w/ distutils?

skip at pobox.com skip at pobox.com
Sat Sep 6 16:47:22 EDT 2008


The bsddb module is on the way out (deprecated in 2.6, gone in 3.0).  That
leaves Python without a cross-platform dbm module to sit underneath anydbm
and shelve.  I figured it might be useful to base something on top of
sqlite3, which is cross-platform.  The result is available in the Python
sandbox:

    http://svn.python.org/view/sandbox/trunk/dbm_sqlite/

There are three files, a dbm.sqlite module, a test case and a modified bit
of dbm documentation.

For testing I'd like to install this in such a way that I can simply 

    import dbm.sqlite

but not overwrite the core install.  I'd also not like to lose dbm.gdbm, etc
during this testing phase.  Is there some way to do this with distutils?
Ideally, I'd like there to be a dbm package in site-packages but which falls
back to the central installation when, say, dbm.gdbm isn't found.

Thx,

Skip



More information about the Python-list mailing list