Skip to content

Commit

Permalink
make sure neuron package is installed in site-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
apdavison committed Oct 28, 2021
1 parent 94053a3 commit 3169b0b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
18 changes: 8 additions & 10 deletions ci/install_neuron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,19 @@ set -e # stop execution in case of errors
if [ "$TRAVIS_PYTHON_VERSION" == "3.9" ]; then
echo -e "\n========== Installing NEURON ==========\n"
export NRN_VERSION="nrn-8.0.0"
export VENV=`python -c "import sys; print(sys.prefix)"`

if [ ! -f "$HOME/$NRN_VERSION/build/config.log" ]; then

if [ ! -f "$HOME/$NRN_VERSION/build/CMakeCache.txt" ]; then
echo 'Cloning NEURON sources from GitHub'
git clone https://github.com/neuronsimulator/nrn -b 8.0.0 $HOME/$NRN_VERSION

mkdir -p $HOME/$NRN_VERSION/build
pushd $HOME/$NRN_VERSION/build
export VENV=`python -c "import sys; print(sys.prefix)"`

cmake .. -DNRN_ENABLE_INTERVIEWS=OFF -DNRN_ENABLE_MPI=ON -DNRN_ENABLE_RX3D=OFF -DCMAKE_INSTALL_PREFIX=$VENV
cmake --build . --target install
ls
else
else:
echo 'Using cached NEURON build directory.'
fi
pushd $HOME/$NRN_VERSION/build

cmake .. -DNRN_ENABLE_INTERVIEWS=OFF -DNRN_ENABLE_MPI=ON -DNRN_ENABLE_RX3D=OFF -DCMAKE_INSTALL_PREFIX=$VENV -DNRN_MODULE_INSTALL_OPTIONS=""
cmake --build . --target install

pip install nrnutils # must be installed after NEURON

Expand Down
4 changes: 2 additions & 2 deletions ci/test_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e # stop execution in case of errors

if [ "$TRAVIS_PYTHON_VERSION" == "3.9" ]; then
python setup.py nosetests --with-coverage --cover-package=pyNN -v --tests=test;
python setup.py nosetests --verbose --with-coverage --cover-package=pyNN --tests=test;
else
python setup.py nosetests -e backends -v --tests=test/unittests;
python setup.py nosetests --verbose -e backends --tests=test/unittests
fi

0 comments on commit 3169b0b

Please sign in to comment.