Building Python with non-traditional paths

D

djbclark

Is there a clean way to build Python under a non-traditional path,
linking with other software that is under non-traditional paths, on
unix?

I maintain a build of Python [1] that is part of a self-contained
bundle of software [2] to run bcfg2 [3].

The major problem I am having is getting the build to link to the
openssl libraries, which are installed under /usr/local/lib/bcfg2/lib;
I tried (on GNU/Linux):

LDFLAGS="-L/usr/local/lib/bcfg2/lib
-Wl,-rpath,/usr/local/lib/bcfg2/lib"
CPPFLAGS="-I/usr/local/lib/bcfg2/include"

but that didn't work. The only thing I could do to get it to work
(sometimes) was to edit the setup.py file directly before the
../configure; make; make install like this:

cat setup.py \
| sed s:\/usr\/local\/:\/usr\/local\/lib\/bcfg2\/:g \
| sed
s:\/usr\/local\/lib\/bcfg2\/ssl\/include:\/usr\/local\/lib\/bcfg2\/include:g
\
| sed
s:\/usr\/contrib\/ssl\/include\/:\/usr\/local\/lib\/bcfg2\/include\/openssl\/:g
\
| sed
s:\/usr\/local\/lib\/bcfg2\/ssl\/lib:\/usr\/local\/lib\/bcfg2\/lib:g \
setup.py.bcfg2
mv setup.py.bcfg2 setup.py

However that is rather ugly, and modifies the source which I'd rather
not do. Is there a better/cleaner way?

[1] Complete build spec for Python for Bcfg2
http://www.bcfg2.org/browser/trunk/bcfg2/encap/src/encap-profiles/bcfg2-python-2.4.3.ep

[2] Bcfg2 Encap Packages - Overview
http://www.bcfg2.org/wiki/EncapPackages

[3] Bcfg2 - Provides a declarative interface to system configuration
http://www.bcfg2.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top