From 882aff7b96b1a3789c38d70bb20c4a09d3d1dbb6 Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Tue, 27 Aug 2024 10:46:32 +0200 Subject: [PATCH 1/5] Restrict to numpy<2 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c4c50541..2adf7a44 100644 --- a/setup.py +++ b/setup.py @@ -137,7 +137,7 @@ def initialize_options(self): author_email='info@precice.org', license='LGPL-3.0', python_requires='>=3', - install_requires=['numpy', 'mpi4py', 'Cython'], + install_requires=['numpy<2', 'mpi4py', 'Cython'], # mpi4py is only needed, if preCICE was compiled with MPI # see https://github.com/precice/python-bindings/issues/8 packages=['precice'], From 3fafab13dc046366dc59ff0767e4ae44c294e225 Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Tue, 27 Aug 2024 10:51:11 +0200 Subject: [PATCH 2/5] Add changelog entry. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab2af4e0..9b08e04d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file. ## latest +* Restrict to numpy < 2 for better compatibility with CI pipeline. https://github.com/precice/python-bindings/pull/213 * Require setuptools >= 61 to guarantee that pyproject.toml is used https://github.com/precice/python-bindings/pull/207 * Fix CI pipeline for spack https://github.com/precice/python-bindings/pull/206 From 73ebff47b32d484bdbe5c16af9cea469dbe14383 Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Tue, 27 Aug 2024 11:17:42 +0200 Subject: [PATCH 3/5] Also restrict numpy in pyproject toml. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 27c696d5..6699bd49 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] # PEP 518 - minimum build system requirements -requires = ["setuptools>=61", "wheel", "Cython>=0.29", "packaging", "pip>=19.0.0", "numpy", "mpi4py", "pkgconfig"] +requires = ["setuptools>=61", "wheel", "Cython>=0.29", "packaging", "pip>=19.0.0", "numpy<2", "mpi4py", "pkgconfig"] From de66ced6c69c95e49e109d5fe7c2c1595f69257e Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Tue, 27 Aug 2024 11:43:56 +0200 Subject: [PATCH 4/5] Restrict to setuptools < 72. --- CHANGELOG.md | 1 + pyproject.toml | 2 +- spack/repo/packages/py-pyprecice/package.py | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b08e04d..2c46a1bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. ## latest * Restrict to numpy < 2 for better compatibility with CI pipeline. https://github.com/precice/python-bindings/pull/213 +* Require setuptools < 72 since support for the test command was removed in Setuptools 72. https://github.com/precice/python-bindings/pull/213 * Require setuptools >= 61 to guarantee that pyproject.toml is used https://github.com/precice/python-bindings/pull/207 * Fix CI pipeline for spack https://github.com/precice/python-bindings/pull/206 diff --git a/pyproject.toml b/pyproject.toml index 6699bd49..c66293b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] # PEP 518 - minimum build system requirements -requires = ["setuptools>=61", "wheel", "Cython>=0.29", "packaging", "pip>=19.0.0", "numpy<2", "mpi4py", "pkgconfig"] +requires = ["setuptools>=61,setuptools<72", "wheel", "Cython>=0.29", "packaging", "pip>=19.0.0", "numpy<2", "mpi4py", "pkgconfig"] \ No newline at end of file diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index 765cd557..7ee79d6e 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -58,8 +58,8 @@ class PyPyprecice(PythonPackage): depends_on("precice@" + ver, when="@" + ver) depends_on("python@3:", type=("build", "link", "run")) - depends_on("py-setuptools@61:", type="build") - depends_on("py-numpy", type=("build", "link", "run")) + depends_on("py-setuptools@61:71", type="build") + depends_on("py-numpy@:1", type=("build", "link", "run")) depends_on("py-mpi4py", type=("build", "run")) depends_on("py-cython@0.29:", type="build") depends_on("py-packaging", type="build") From 8953afce39876d7773e09f60e35418fa915c342d Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Tue, 27 Aug 2024 11:51:01 +0200 Subject: [PATCH 5/5] Fix syntax. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c66293b6..6f8c358a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] # PEP 518 - minimum build system requirements -requires = ["setuptools>=61,setuptools<72", "wheel", "Cython>=0.29", "packaging", "pip>=19.0.0", "numpy<2", "mpi4py", "pkgconfig"] \ No newline at end of file +requires = ["setuptools>=61,<72", "wheel", "Cython>=0.29", "packaging", "pip>=19.0.0", "numpy<2", "mpi4py", "pkgconfig"] \ No newline at end of file