Skip to content

Instantly share code, notes, and snippets.

@sestaton
Last active August 29, 2015 13:57
Show Gist options
  • Save sestaton/ee28b467215bfda82aa0 to your computer and use it in GitHub Desktop.
Save sestaton/ee28b467215bfda82aa0 to your computer and use it in GitHub Desktop.
build deps for GMPY2 and install Ecolopy
#!/bin/bash
## Location for local build of gmpy2 and deps
cd apps
mkdir gmpy2 && cd gmpy2
## Download and compile gmp
wget https://ftp.gnu.org/gnu/gmp/gmp-5.1.3.tar.bz2 && tar xjf gmp-5.1.3.tar.bz2
cd gmp-5.1.3
./configure --prefix=/home/jmblab/statonse/apps/gmpy2
make
make check
make install
cd ..
## Download mpir, mpfr, mpc, gmpy2 full source from https://code.google.com/p/gmpy/downloads/list
unzip full-src-mpir-mpfr-mpc-gmpy2-2.0.2.zip
cd src/mpfr
chmod +x configure
./configure --prefix=/home/jmblab/statonse/apps/gmpy2 --with-gmp=/home/jmblab/statonse/apps/gmpy2
make
make check
make install
## Compile mpc
cd ../mpc
chmod +x configure
./configure --prefix=/home/jmblab/statonse/apps/gmpy2 --with-gmp=/home/jmblab/statonse/apps/gmpy2 --with-mpfr=/home/jmblab/statonse/apps/gmpy2
make
make check
make install
## Build Python package gmpy2
cd ../gmpy2-2.0.0b3
/usr/local/python/2.7.2/bin/python setup.py build_ext -Ddir=/home/jmblab/statonse/apps/gmpy2
export PYTHONPATH=/home/jmblab/statonse/apps/gmpy2/src/gmpy2-2.0.0b3/build/lib.linux-x86_64-2.7
## Clone and build Ecolopy
cd ~/apps
git clone https://github.com/fransua/ecolopy.git
cd ecolopy
/usr/local/python/2.7.2/bin/python setup.py build
export PYTHONPATH=$PYTHONPATH:/home/jmblab/statonse/apps/ecolopy/build/lib
## To test, $DISPLAY needs to be set, so login with `ssh user@server -X`
/usr/local/python/2.7.2/bin/python examples/little_tour_with_bci_dataset.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment