.. but without luck :(
For your reference, I'm building python, numpy, etc... copperhead like this:
#!/bin/bash -x
export PREFIX=/opt/local
function create_opt_local() {
rm -r -f ~/.virtualenvs
rm -r -f ${PREFIX}/bin ${PREFIX}/include ${PREFIX}/lib ${PREFIX}/share
sudo mkdir -p ${PREFIX}/bin ${PREFIX}/include ${PREFIX}/lib ${PREFIX}/share
sudo chown -R rgomes:rgomes ${PREFIX}
}
#--------------------------------------------------
# essential tools
#--------------------------------------------------
function install_essential_tools() {
sudo apt-get install zip unzip bzip2 gzip xz-utils wget curl -y
sudo apt-get install build-essential gcc g++ gfortran -y
sudo apt-get install autoconf scons pkg-config -y
sudo apt-get install git bzr mercurial -y
}
#--------------------------------------------------
# downloading everything
#--------------------------------------------------
function download_everything() {
mkdir -p ~/Downloads
pushd ~/Downloads
wget
http://sourceforge.net/projects/boost/files/boost/1.48.0/boost_1_48_0.tar.bz2wget
http://thrust.googlecode.com/files/thrust-1.6.0.zipwget
http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.xzwget
http://downloads.sourceforge.net/project/numpy/NumPy/1.6.2/numpy-1.6.2.tar.gzwget
http://downloads.sourceforge.net/project/scipy/scipy/0.11.0/scipy-0.11.0.tar.gzwget
http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.10.tar.bz2wget
http://www.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gzwget
http://downloads.sourceforge.net/project/pytables/pytables/2.4.0/tables-2.4.0.tar.gzwget
http://vitables.googlecode.com/files/ViTables-2.1.tar.gzwget
http://pypi.python.org/packages/source/p/pandas/pandas-0.9.1.tar.gzpopd
}
#--------------------------------------------------
# build Python from sources
#--------------------------------------------------
# [01:05] <MindDrive> frgomes, just in case you're morbidly curious, I keep notes on all my own builds, here's
# the configure I used for Python 2.7.3 on my Solaris 10 system:
# CPPFLAGS="-I/software/include -I/usr/sfw/include" \
# LDFLAGS="-L/software/lib -R/software/lib -L/usr/sfw/lib -R/usr/sfw/lib" \
# ./configure --enable-shared --prefix=/software/python-2.7.3
function build_python() {
cd ~/sources
sudo apt-get install libicu44 libicu-dev zlib1g-dev libbz2-dev libncurses5-dev libreadline-gplv2-dev libsqlite3-dev libssl-dev libgdbm-dev -y
#--
tar xf ~/Downloads/Python-2.7.3.tar.xz
cd Python-2.7.3
export CC=gcc
export CXX=g++
export LD_RUN_PATH=${PREFIX}/lib
./configure --prefix=${PREFIX} --enable-shared --enable-unicode=ucs4 --with-pydebug
make -j 8
#make test
make install
unset CC CXX LD_RUN_PATH
}
#--------------------------------------------------
# install package managers
#--------------------------------------------------
function install_package_managers() {
cd ~/sources
curl
http://python-distribute.org/distribute_setup.py | ${PREFIX}/bin/python
curl
https://raw.github.com/pypa/pip/master/contrib/get-pip.py | ${PREFIX}/bin/python
}
#--------------------------------------------------
# install virtualenv and virtualenvwrapper
#--------------------------------------------------
function install_virtualenv() {
cd ~/sources
sudo apt-get install python-virtualenv virtualenvwrapper -y
}
#--------------------------------------------------
# virtual environment for Python 2.7
#--------------------------------------------------
function create_virtualenv_py27() {
mkvirtualenv --no-site-packages --python=${PREFIX}/bin/python py27
#--
echo "export PATH=${PREFIX}/bin:${PREFIX}/cuda/bin:$PATH" >> ~/.virtualenvs/py27/bin/postactivate
echo "export LD_LIBRARY_PATH=${PREFIX}/lib" >> ~/.virtualenvs/py27/bin/postactivate
}
#--------------------------------------------------
# install other packages with pip
#--------------------------------------------------
function install_packages_1() {
pip install setuptools --upgrade
pip install distribute --upgrade
pip install Sphinx
pip install Cython
pip install tornado
pip install pyzmq
pip install ipython
pip install uncertainties
}
#--------------------------------------------------
# build numpy from sources
#--------------------------------------------------
function build_numpy() {
cd ~/sources
sudo apt-get install libatlas-base-dev libblas-dev libatlas-base-dev -y
tar xf ~/Downloads/numpy-1.6.2.tar.gz
cd numpy-1.6.2
rm -r -f build
python --version
python setup.py --requires
python setup.py build
python setup.py install
}
#--------------------------------------------------
# build scipy from sources
#--------------------------------------------------
function build_scipy() {
cd ~/sources
tar xf ~/Downloads/scipy-0.11.0.tar.gz
cd scipy-0.11.0
rm -r -f build
python --version
python setup.py --requires
python setup.py build
python setup.py install
}
#--------------------------------------------------
# install other packages with pip
#--------------------------------------------------
function install_packages_2() {
pip install numexpr
}
#--------------------------------------------------
# build szip from sources
#--------------------------------------------------
function build_szip() {
cd ~/sources
sudo apt-get install zlib-bin -y
#--
tar xf ~/Downloads/szip-2.1.tar.gz
cd szip-2.1
./configure --prefix=${PREFIX} --enable-encoding
make clean
make -j 8
make install
}
#--------------------------------------------------
# build HDF5 from sources - requires szip
#--------------------------------------------------
function build_hdf5() {
cd ~/sources
sudo apt-get build-dep hdf5 -y
tar xf ~/Downloads/hdf5-1.8.10.tar.bz2
cd hdf5-1.8.10
CC=/usr/bin/mpicc ./configure --prefix=${PREFIX} --enable-shared --enable-parallel --with-szlib=${PREFIX}
make clean
make -j 8
make check
make install
make check-install
make clean
}
#--------------------------------------------------
# build pytables from sources
#--------------------------------------------------
function build_pytables() {
cd ~/sources
sudo apt-get install libbz2-dev liblzo2-dev -y
#--
tar xf ~/Downloads/tables-2.4.0.tar.gz
cd tables-2.4.0/
python --version
python setup.py --requires
CC=/usr/bin/mpicc HDF5_DIR=${PREFIX} python setup.py install
}
#--------------------------------------------------
# build vitables from sources
#--------------------------------------------------
function build_vitables() {
cd ~/sources
tar xf ~/Downloads/ViTables-2.1.tar.gz
cd ViTables-2.1/
python --version
python setup.py --requires
python setup.py build
python setup.py install
}
#--------------------------------------------------
# build pandas from sources
#--------------------------------------------------
function build_pandas() {
cd ~/sources
tar xf ~/Downloads/pandas-0.9.1.tar.gz
cd pandas-0.9.1
rm -r -f build dist
python --version
python setup.py --requires
python setup.py build
python setup.py install
}
#--------------------------------------------------
# build boost from sources
#--------------------------------------------------
function build_boost() {
cd ~/sources
tar xf ~/Downloads/boost_1_48_0.tar.bz2
cd boost_1_48_0
#-- install on ${PREFIX}
mkdir -p ${PREFIX}
#--
./bootstrap.sh --prefix=${PREFIX} --with-python=${PREFIX}/bin/python --with-icu
./b2 -j 8
./b2 install
}
#--------------------------------------------------
# install thrust library
#--------------------------------------------------
function build_thrust() {
pushd ${PREFIX}/include
unzip ~/Downloads/thrust-1.6.0.zip
popd
}
#--------------------------------------------------
# build copperhead from sources
#--------------------------------------------------
function build_copperhead() {
cd ~/sources
git clone
http://github.com/copperhead/copperhead.gitcd copperhead
#--
rm -r -f dist stage .sconf_temp .sconsign.dblite config.log
rm -r -f ${PREFIX}/lib/python2.7/site-packages/copperhead*
#--
sudo rm /usr/local/cuda
sudo ln -s ${PREFIX}/cuda /usr/local/cuda
#--
cat << EOD > siteconf.py
BOOST_INC_DIR = "${PREFIX}/include"
BOOST_LIB_DIR = "${PREFIX}/lib"
BOOST_PYTHON_LIBNAME = "boost_python"
CUDA_INC_DIR = "/usr/local/cuda/include"
CUDA_LIB_DIR = "/usr/local/cuda/lib64"
NP_INC_DIR = "${PREFIX}/lib/python2.7/site-packages/numpy/core/include"
TBB_INC_DIR = None
TBB_LIB_DIR = None
THRUST_DIR = "${PREFIX}/include"
EOD
cat siteconf.py
#--
python --version
python setup.py install
#--
##unset LD_LIBRARY_PATH
}
#--------------------------------------------------
# main script
#--------------------------------------------------
create_opt_local
install_essential_tools
download_everything
build_python
read -p "Press any key to continue..."
install_package_managers
read -p "Press any key to continue..."
install_virtualenv
source /etc/bash_completion.d/virtualenvwrapper
read -p "Press any key to continue..."
create_virtualenv_py27
read -p "Press any key to continue..."
workon py27
read -p "Press any key to continue..."
install_packages_1
read -p "Press any key to continue..."
build_numpy
read -p "Press any key to continue..."
build_scipy
read -p "Press any key to continue..."
install_packages_2
read -p "Press any key to continue..."
build_szip
read -p "Press any key to continue..."
build_hdf5
read -p "Press any key to continue..."
build_pytables
read -p "Press any key to continue..."
build_vitables
read -p "Press any key to continue..."
build_pandas
read -p "Press any key to continue..."
build_boost
read -p "Press any key to continue..."
build_thrust
read -p "Press any key to continue..."
build_copperhead
read -p "Press any key to continue..."
echo "done."