Building Python with gdbm support



I am trying to use a Perl script which requires a Database module other
than "dbm" to be the default Mod. So, what the script is checking is

import anydbm
if (anydbm._defaultmod.__name__ == 'dumbdbm'
or anydbm._defaultmod.__name__ == 'dbm'):

First of, I'm doing this on a Sparc/Solaris 8 box.

So, I'm trying to get gdbm to be the default mod. I've downloaded and
built gdbm-1.8.3. It has not been build to /usr (I don't have root
access). I've built this fine.

When I build Python 2.4.1, it at first doesn't pick up on the gdbm
module ("dbm" is still the default module, and Modules directory in the
Python source doesn'thave a .o file for the gdbmmodule file).

I've nosed around, and found the a line commented out Modules/Setup
file, regarding building the gdbm module. I uncommented it (being sure
that the approrpiate directories for the .h and lib files are
provided), and it looked like it built the module. But when I attempt
to start python, I get an error:

ld.so.1: python: fatal: libgdbm.so.3: open failed: No such file or
directory
Killed


Look, the bottom line is I don't know what the correct steps are to get
the gdbm module built in as part of the Python installation (as well as
setting it as the default database module). I've tried to piece
together bits and pieces of various newsgroup messages, as I haven't
found a decent spot for any doco.

Can anyone point me in the right direction, in regards to how to get my
Python installation set up the way I want?

Is it correct to edit the Modules/Setup file? I would have thought
that the configure approach would support these types of isses, rather
than manually editing a file? Should I be using the setup.py script?
I have no idea what that does, or where I would call it, but the name
of it sounds like it should be included?

Thanks for any help,
Ed

.



Relevant Pages

  • Re: perl to python
    ... sed and perl can let you do all that quick command line stuff. ... into a full blown script. ... scripts, call it from the python interpreter, whatever I need. ... If I stick to the traditional unix approach, ...
    (comp.lang.python)
  • Re: Learning Tkinter
    ... and how the command option is used to call the function callback. ... gui programming to see if the python programs I have written can be made ... search their computer for this file, execute the python code and then ... This is the meaning of the test on __name__: this magical variable is set to the string '__main__' if and only if the current script is the top-most one, i.e the one you ran python on. ...
    (comp.lang.python)
  • Correct way to handle independent interpreters when embedding in a single-threaded C++ app
    ... The Python interpreter is ... interpreter and provides an extension module to expose ... manage each script runs in a new interpreter. ... globals that could cause issues. ...
    (comp.lang.python)
  • Re: bash vs. python scripts - which one is better?
    ... Quick, take your one liner, have it traverse an entire directory tree ... For me I just need to change my small script into a function, ... That is where shell falls down. ... alternatives like Python, Perl or Ruby laying around to be used. ...
    (Debian-User)
  • Re: Correct way to handle independent interpreters when embedding in a single-threaded C++ app
    ... Since you are not running any python scripts or calling any python ... This will also ensure that execution of one script wont ... the script and thus shut down the interpreter. ...
    (comp.lang.python)