From 7fcc940d8de7a8246c1acd0e06c9bdaa7ee91ac8 Mon Sep 17 00:00:00 2001 From: James Douglass Date: Thu, 27 Jun 2024 16:43:06 -0700 Subject: [PATCH] Building against oldest-supported-numpy for python3.8, numpy2 for all others. RE:#396 --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0765e5c0..66bc9863 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,9 @@ dynamic = ["version", "dependencies", "optional-dependencies", "readme"] # that we can provide a much easier build experience so long as GDAL is # available at runtime. requires = [ - 'setuptools', 'wheel', 'setuptools_scm', 'cython>=3.0.0', 'numpy>=2' + 'setuptools', 'wheel', 'setuptools_scm', 'cython>=3.0.0', + 'oldest-supported-numpy; python_version<="3.8"', + 'numpy>=2; python_version>="3.9"', # Numpy 2 only available for 3.9+ ] build-backend = "setuptools.build_meta"