Skip to content

Travis: build for generic architecture #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
12 commits merged into from
Oct 9, 2017
50 changes: 50 additions & 0 deletions build_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#! /bin/sh

set -e -x

if [ -n "$IS_OSX" ]; then
local PLATFORM_ARGS=--host=x86_64-darwin-none
else
local PLATFORM_ARGS=--enable-fat
fi

wget http://mpir.org/mpir-2.7.0.tar.bz2
tar -xf mpir-2.7.0.tar.bz2
cd mpir-2.7.0
./configure --enable-gmpcompat --prefix=$HOME/deps --disable-static $PLATFORM_ARGS
make -j4 > /dev/null 2>&1
make install
cd ..

wget http://www.mpfr.org/mpfr-3.1.4/mpfr-3.1.4.tar.bz2
tar -xf mpfr-3.1.4.tar.bz2
cd mpfr-3.1.4
./configure --with-gmp=$HOME/deps --prefix=$HOME/deps --disable-static $PLATFORM_ARGS
make -j4 > /dev/null 2>&1
make install
cd ..

wget http://flintlib.org/flint-2.5.2.tar.gz
tar -xf flint-2.5.2.tar.gz
cd flint-2.5.2
./configure --with-gmp=$HOME/deps --with-mpfr=$HOME/deps --prefix=$HOME/deps --disable-static
make -j4 > /dev/null 2>&1
make install
cd ..

cd arb
./configure --with-mpir=$HOME/deps --with-mpfr=$HOME/deps --with-flint=$HOME/deps --prefix=$HOME/deps
make -j4
make install
cd ..


if [ -n "$IS_OSX" ]; then
:
else
export LIBRARY_PATH=$LIBRARY_PATH:/root/deps/lib:/root/deps/lib/flint
export INCLUDE_PATH=$INCLUDE_PATH:/root/deps/include:/root/deps/include/flint

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBRARY_PATH
export LD_INCLUDE_PATH=$LD_INCLUDE_PATH:$INCLUDE_PATH
fi
14 changes: 3 additions & 11 deletions config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,13 @@
function pre_build {
# Any stuff that you need to do before you start building the wheels
# Runs in the root directory of this repository.
cd arb
./.build_dependencies
./configure --with-mpir=$HOME/deps --with-mpfr=$HOME/deps --with-flint=$HOME/deps --prefix=$HOME/deps
make -j4
make install
cd ..

source ./build_dependencies.sh

# Now go into the project directory and run a custom build_ext command
cd python-flint
python -m pip install cython
python setup.py build_ext \
--include-dirs=/root/deps/include:/root/deps/include/flint \
--library-dirs=/root/deps/lib:/root/deps/lib/flint
python setup.py build_ext --include-dirs=$LD_INCLUDE_PATH --library-dirs=$LD_LIBRARY_PATH
cd ..
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/deps/lib:/root/deps/lib/flint
}

function run_tests {
Expand Down