From 17e963ec51819701c9e0e58802022ee52b919613 Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Thu, 4 Nov 2021 11:04:30 +0100 Subject: [PATCH] fix building of NEST on Travis, following merge of nest-3 branch --- ci/install_nest.sh | 26 ++++++++++++++------------ setup.py | 2 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/ci/install_nest.sh b/ci/install_nest.sh index 661cc599..8b6d7e0c 100644 --- a/ci/install_nest.sh +++ b/ci/install_nest.sh @@ -6,38 +6,40 @@ if [ "$TRAVIS_PYTHON_VERSION" == "3.9" ]; then echo -e "\n========== Installing NEST ==========\n" # Specify which version of NEST to install #export NEST_VERSION="master" - export NEST_VERSION="3.0" + export NEST_VERSION="3.1" pip install cython if [ "$NEST_VERSION" = "master" ]; then export NEST="nest-simulator-$NEST_VERSION" - wget https://github.com/nest/nest-simulator/archive/$NEST_VERSION.tar.gz -O $HOME/$NEST.tar.gz; + wget https://github.com/nest/nest-simulator/archive/$NEST_VERSION.tar.gz -O $HOME/$NEST.tar.gz else export NEST="nest-simulator-$NEST_VERSION" - wget https://github.com/nest/nest-simulator/archive/v$NEST_VERSION.tar.gz -O $HOME/$NEST.tar.gz; + wget https://github.com/nest/nest-simulator/archive/refs/tags/v$NEST_VERSION.tar.gz -O $HOME/$NEST.tar.gz fi - pushd $HOME; - tar xzf $NEST.tar.gz; - ls; - popd; + pushd $HOME + tar xzf $NEST.tar.gz + ls + popd mkdir -p $HOME/build/$NEST pushd $HOME/build/$NEST export VENV=`python -c "import sys; print(sys.prefix)"`; - export PYLIB_GLOBAL=`find /opt/python/${TRAVIS_PYTHON_VERSION}/lib/ -name "libpython${TRAVIS_PYTHON_VERSION}*.so"`; - ln -s ${PYLIB_GLOBAL} $VENV/lib/libpython${TRAVIS_PYTHON_VERSION}.so; - export PYTHON_INCLUDE_DIR=$VENV/include/python${TRAVIS_PYTHON_VERSION} + + export PYLIB_GLOBAL=`find /opt/python/${TRAVIS_PYTHON_VERSION}/lib/ -name "libpython${TRAVIS_PYTHON_VERSION}*.so"` + ln -s ${PYLIB_GLOBAL} $VENV/lib/libpython${TRAVIS_PYTHON_VERSION}.so + mkdir -p $VENV/include + ln -s /opt/python/${TRAVIS_PYTHON_VERSION}/include/python${TRAVIS_PYTHON_VERSION} $VENV/include/python${TRAVIS_PYTHON_VERSION}; + cython --version; cmake --version; cmake -DCMAKE_INSTALL_PREFIX=$VENV \ -Dwith-mpi=ON \ -DPYTHON_EXECUTABLE=$VENV/bin/python \ -DCYTHON_EXECUTABLE=$VENV/bin/cython \ - -DPYTHON_LIBRARY=$VENV/lib/libpython${TRAVIS_PYTHON_VERSION}.so \ - -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR} \ $HOME/$NEST; + make; make install; popd; diff --git a/setup.py b/setup.py index 0698d8f0..849b840c 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ def run_command(path, working_directory): universal_newlines=True, cwd=working_directory) stdout, stderr = p.communicate() - return p.returncode, stdout + return p.returncode, stdout.split("\n") class build(_build):