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

Skip Montanaro skip@pobox.com
Wed, 19 Jun 2002 15:52:26 -0500

    Barry> Here's a small patch to setup.py which should fix things in a
    Barry> portable way, at least for *nix systems.  It sets the envar
    Barry> LD_RUN_PATH to the location that it found the Berkeley library,
    Barry> but only if that envar isn't already set.

    Martin> I dislike that change. Setting LD_RUN_PATH is the jobs of
    Martin> whoever is building the compiler, and should not be done by
    Martin> Python automatically.

Agreed.  Also, is LD_RUN_PATH widely available?

    Martin> If setup.py fails to build an extension correctly, it is the
    Martin> adminstrator's job to specify a correct build procedure in
    Martin> Modules/Setup. For that reason, I rather recommend to remove the
    Martin> magic that setup.py looks in /usr/local/Berkeley*, instead of
    Martin> adding more magic.

I'm happy with the current setup.  While the /usr/local/BerkeleyN.M location
is a bit odd, Sleepycat is pretty consistent in this regard.  (At least
versions 3 and 4 install this way.)  I'd rather require sysadmins to run
ldconfig or its equivalent.

Most of the time people install packages using the default locations.  In
those situations where they don't, distutils accepts a couple environment
variables which specific alternate search directories for libraries and
include files.  Their names escape me at the moment, and I'm not sure they
accept the usual colon-separated list of directories.  If they don't, they
should be suitably modified.  It should probably be easy to specify these
through some configure command line args.