Building things with setup.py

James Stroud jstroud at mbi.ucla.edu
Fri Sep 22 22:11:33 CEST 2006


Robert Kern wrote:
>> Sorry. To clarify, making libpython2.5a available in a 
>> $LD_LIBRARY_PATH was necessary to build numpy and scipy.
> 
> I don't see how that could have affected anything. Static libraries 
> aren't looked up in $LD_LIBRARY_PATH. Certainly not for build-time linking.

OK--new thing learned for the day. <rant>I try things until a build 
works. I consider everything I do until acquiring a working build as 
necessary. Going back to see exactly what I did to make things work is 
not a viable option given that every new program I want requires my 
building it and all of its dependencies--a consequence of the [adjective 
deleted] beuracratic constraints (with regard to the machine on my 
desktop) that have evolved here. These constraints are no doubt a 
byproduct of the "Institute" part of my signature below, associated 
paranoia, and over-worked sys-admins.</rant>

The upside is that my entire environment turns out to be roughly 
transportable to other Linux machines on the network via an NFS home 
directory--more or less independent of the configuration of said other 
machines.

> What do your environment variables look like when you build?

euler 2% echo $CPPFLAGS
-I/data10/users/jstroud/Programs/include 
-I/data10/users/jstroud/Programs/qt/include -I/usr/include 
-I/data10/users/jstroud/Programs/include/freetype2/freetype
euler 3% echo $LD_LIBRARY_PATH
/data10/users/jstroud/Programs/lib:/data10/users/jstroud/Programs/qt/lib:/usr/lib:/usr/X11R6/lib/:/usr/local/lib:/usr/lib/gcc-lib/i386-redhat-linux/3.2.3:/data10/users/jstroud/Programs/ccp4-5.0.2/lib
euler 4% echo $LDFLAGS
-L/data10/users/jstroud/Programs/lib 
-L/usr/lib/gcc-lib/i386-redhat-linux/3.2.3

Here is how I customize my ld.so.cache:

euler 9% cat ldconf
rm ld.so.cache
/sbin/ldconfig -v -f ./ld.so.conf -C ./ld.so.cache
echo source this

euler 10% cat ld.so.conf
/data10/users/jstroud/Programs/lib
/data10/users/jstroud/Programs/qt/lib
/data10/users/jstroud/Programs/newlib
/usr/lib
/usr/local/lib
/usr/X11R6/lib
/usr/lib/qt3/lib
/usr/lib/wine
/usr/include/pgsql

Again, see the above rant for an explanation about any needless paths or 
flags--though advice and knowledge is welcome.

James

-- 
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/



More information about the Python-list mailing list