diff --git a/nrn_requirements.txt b/nrn_requirements.txt index 1de5573095..9e8dff14f6 100644 --- a/nrn_requirements.txt +++ b/nrn_requirements.txt @@ -4,10 +4,7 @@ setuptools<=70.3.0 scikit-build matplotlib ipython -cython -packaging -pytest<=8.1.1 # potential bug from 8.2.0 due to parallelism? -pytest-cov mpi4py<4 # MUSIC not compatible with MPI 4 -numpy find_libpython +-r packaging/python/build_requirements.txt +-r packaging/python/test_requirements.txt diff --git a/packaging/python/build_wheels.bash b/packaging/python/build_wheels.bash index eeebf32f21..abea2dcb5b 100755 --- a/packaging/python/build_wheels.bash +++ b/packaging/python/build_wheels.bash @@ -25,11 +25,15 @@ fi py_ver="" +# path to the (temp) requirements file containing all of the build dependencies +# for NEURON and its submodules +python_requirements_path="$(mktemp -d)/requirements.txt" + clone_nmodl_and_add_requirements() { git config --global --add safe.directory /root/nrn git submodule update --init --recursive --force --depth 1 -- external/nmodl # We only want the _build_ dependencies - sed -e '/^# runtime dependencies/,$ d' external/nmodl/requirements.txt >> my_requirements.txt + sed -e '/^# runtime dependencies/,$ d' external/nmodl/requirements.txt >> "${python_requirements_path}" } @@ -61,7 +65,7 @@ build_wheel_linux() { echo " - Installing build requirements" pip install auditwheel - cp packaging/python/build_requirements.txt my_requirements.txt + cp packaging/python/build_requirements.txt "${python_requirements_path}" CMAKE_DEFS="NRN_MPI_DYNAMIC=$3" if [ "$USE_STATIC_READLINE" == "1" ]; then @@ -74,8 +78,8 @@ build_wheel_linux() { CMAKE_DEFS="${CMAKE_DEFS},LINK_AGAINST_PYTHON=OFF,CORENRN_ENABLE_OPENMP=ON" fi - cat my_requirements.txt - pip install -r my_requirements.txt + cat "${python_requirements_path}" + pip install -r "${python_requirements_path}" pip check echo " - Building..." @@ -116,7 +120,7 @@ build_wheel_osx() { (( $skip )) && return 0 echo " - Installing build requirements" - cp packaging/python/build_requirements.txt my_requirements.txt + cp packaging/python/build_requirements.txt "${python_requirements_path}" CMAKE_DEFS="NRN_MPI_DYNAMIC=$3" if [ "$USE_STATIC_READLINE" == "1" ]; then @@ -129,8 +133,8 @@ build_wheel_osx() { CMAKE_DEFS="${CMAKE_DEFS},LINK_AGAINST_PYTHON=OFF" fi - cat my_requirements.txt - pip install -U delocate -r my_requirements.txt + cat "${python_requirements_path}" + pip install -U delocate -r "${python_requirements_path}" pip check echo " - Building..." diff --git a/packaging/python/test_requirements.txt b/packaging/python/test_requirements.txt index 6dbabce060..8f4d5c74aa 100644 --- a/packaging/python/test_requirements.txt +++ b/packaging/python/test_requirements.txt @@ -1,2 +1,5 @@ -pytest -setuptools;python_version>='3.12' # From 3.12, no longer installed by default +pytest<=8.1.1 # potential bug from 8.2.0 due to parallelism? +# for coverage +pytest-cov +# for RXD test +plotly