[Python-Dev] Distutils confuses Berkeley DB and dbm?
M.-A. Lemburg
mal@lemburg.com
Fri, 31 May 2002 09:45:05 +0200
Skip Montanaro wrote:
> Would someone on Linux please try the following:
>
> import dbm
> f = dbm.open("foo", "c")
> f["1"] = "1"
> f.close
>
> then ask the file command what kind of file it is. On my system it tells me
> the file is a Berkeley DB 1.85 hash file. I figure that distutils is
> getting ahold of the libdb dbm-compatibility include files and libraries and
> using them. On my system, the only ndbm.h is in /usr/include/db1. Here's
> how the dbm module builds on my system:
>
> building 'dbm' extension
> gcc -DNDEBUG -O3 -fPIC
> -I. -I/home/skip/src/python/head/dist/src/./Include -I/usr/local/include \
> -IInclude/ -c /home/skip/src/python/head/dist/src/Modules/dbmmodule.c -o \
> build/temp.linux-i686-2.3/dbmmodule.o
> gcc -shared build/temp.linux-i686-2.3/dbmmodule.o -L/usr/local/lib -ldb1 \
> -o build/lib.linux-i686-2.3/dbm.so
>
> I know there is a bug report open about something related to building
> Berkeley DB-based modules, but I'm offline at the moment so I can't check
> it. Barry, were you going to look at this? How about a little
> collaboration? I think I'm mostly responsible for what distutils does as
> far as building bsddb.
Perhaps you ought to have a look at mx.BeeBase ? It's portable
and fast, has locks and transactions. (And it builds on all
platforms where egenix-mx-base builds.)
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/
Meet us at EuroPython 2002: http://www.europython.org/