The following document describes how I build PySCeS on my Mandriva Linux 2007 systems

Although the instructions in this document have been tested on Mandriva Linux 2007 (many thanks to Charl Moller for input and corrections) they should be useful for installing this stuff onto any package based Linux distribution. Brett.

This document assumes that you have:

  1. ATLAS (3.7.28) (http://math-atlas.sourceforge.net)
  2. LAPACK 3.0 (http://www.netlib.org)
  3. Recent SVN snapshots of ipython, numpy, scipy (http://scipy.org)
  4. The latest PySCeS (http://pysces.sourceforge.net)
or the pysces_bundle which contains everything you need.

Mandriva 2007 packages

Required (use urpmi)

Recommended (required for addon modules)

Core Source (pysces_bundle_20070219.tar.gz)

unpack LAPACK
Overwrite LAPACK/make.inc with make.inc.lapack.gcc4
cd BLAS/SRC/
make
cd ../..
make lib

Option 1 (the traditional way)

unpack atlas-3.7.24
mkdir ATLAS_BUILD
cd ATLAS_BUILD
../ATLAS/configure
make
make check

mkdir atlas+lapack
cd atlas+lapack
cp ../ATLAS_BUILD/lib/*.a .

mkdir tmp
cd tmp
ar x ../liblapack.a
cp ../../LAPACK/lapack_LINUX.a ../liblapack.a
ar r ../liblapack.a *.o
cd ..
rm -rf tmp

cp *.a /usr/local/lib/
cp ../ATLAS/include/cblas.h /usr/local/include

Install numpy (python setup.py install)
Install scipy (python setup.py install)
Install ScientificPython (python setup.py install)
Install Ipython (python setup.py install)

Install PySCeS (USE_NEWSCIPY=1 python setup.py install)

if NLEQ2 fails to compile:
Go to line 46 of setup.py and set:
nleq2_byteorder_override = 1
then overwrite nleq2.f (in /pysces/nleq2) with nleq2_gfortran.f
Install PySCeS (USE_NEWSCIPY=1 python setup.py install)

Option 2 (the new ATLAS way)

../ATLAS/configure --with-netlib-lapack=</your/path/to/lapack_LINUX.a>
make
make check
make install

(I like stuff in /usr/local/lib and /usr/local/include if you do or if you've previously followed these instructions and want stuff in the same place, do the following. Otherwise skip this step but make sure to delete older version of ATLAS libs and includes)
mv /usr/local/atlas/include/* /usr/local/include
mv /usr/local/atlas/lib/* /usr/local/lib

Test installation (preferably as non-root)

ipython

import numpy, scipy, pysces

numpy.test(10)
scipy.test(10)
pysces.test(3)

numpy and pysces should have no test failures scipy probably will
(handle on a case by case basis)

Contrib source

Install pyparsing (python setup.py install)
Install pydot (python setup.py install)
copy pysces/contrib/visualise $INSTALLED_PYSCES/contrib/

Building libsbml

There seems to be a problem with libxerces using Mandriva 2007 so this is to
build libsbml from source.

urpmi expat
urpmi expat-devel
urpmi swig-devel

unpack libsbml.zip
./configure --prefix=/usr --with-expat --with-python
make
make install
vi /usr/lib/python2.4/site-packages/pysces/pyscfg.ini
set: sbml = 1

All feedback on this recipe welcome, let me know if you encounter any aliens ...

Brett

(c) Brett Olivier, Stellenbosch, 2006 - 2007