From b62426773c2d570c53d2db7e7e8a670005e2a43b Mon Sep 17 00:00:00 2001 From: Koen van Walstijn Date: Fri, 23 Aug 2024 14:52:34 +0200 Subject: [PATCH] Test wheels with both latest and oldest NumPy --- packaging/python/oldest_numpy_requirements.txt | 5 +++++ packaging/python/test_requirements.txt | 9 +-------- packaging/python/test_wheels.sh | 10 ++++++++-- 3 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 packaging/python/oldest_numpy_requirements.txt diff --git a/packaging/python/oldest_numpy_requirements.txt b/packaging/python/oldest_numpy_requirements.txt new file mode 100644 index 0000000000..4a77e64c2b --- /dev/null +++ b/packaging/python/oldest_numpy_requirements.txt @@ -0,0 +1,5 @@ +numpy==1.20.3;python_version=='3.9' and platform_machine!='arm64' +numpy==1.21.6;python_version=='3.9' and platform_machine=='arm64' +numpy==1.21.6;python_version=='3.10' +numpy==1.23.5;python_version=='3.11' +numpy==1.26.4;python_version=='3.12' diff --git a/packaging/python/test_requirements.txt b/packaging/python/test_requirements.txt index 06e85a5d63..e92c3c1a67 100644 --- a/packaging/python/test_requirements.txt +++ b/packaging/python/test_requirements.txt @@ -1,10 +1,3 @@ -# General test requirements pytest setuptools;python_version>='3.12' # From 3.12, no longer installed by default - -# Oldest supported numpy versions -numpy==1.20.3;python_version=='3.9' and platform_machine!='arm64' -numpy==1.21.6;python_version=='3.9' and platform_machine=='arm64' -numpy==1.21.6;python_version=='3.10' -numpy==1.23.5;python_version=='3.11' -numpy==1.26.4;python_version=='3.12' +numpy diff --git a/packaging/python/test_wheels.sh b/packaging/python/test_wheels.sh index ac0cfab918..2c4aab6816 100755 --- a/packaging/python/test_wheels.sh +++ b/packaging/python/test_wheels.sh @@ -269,8 +269,14 @@ if echo $compile_options | grep "NRN_ENABLE_CORENEURON=ON" > /dev/null ; then has_coreneuron=true fi -# run tests -test_wheel "${python_exe}" +# run tests with latest NumPy +echo " == Running tests with latest NumPy == " +time test_wheel "${python_exe}" + +# run tests with oldest supported NumPy +echo " == Running tests with oldest supported NumPy == " +$python_exe -m pip install -r packaging/python/oldest_numpy_requirements.txt +time test_wheel "${python_exe}" # cleanup if [[ "$use_venv" != "false" ]]; then