From 3bf318b678f0e4024edc9ba8bcbce707cba09173 Mon Sep 17 00:00:00 2001 From: Bruce Merry Date: Fri, 5 Mar 2021 09:18:46 +0200 Subject: [PATCH] Add a pyproject.toml to control build-time numpy version Build against the oldest C_API_VERSION available for the current Python version, to maximise compatibility of the resulting installation. Closes #271. --- pyproject.toml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..50864b6a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,13 @@ +[build-system] + +# For each Python version, build against the oldest numpy C_API_VERSION for +# which binary numpy wheels exist, and then the newest version of numpy +# implementing that C_API_VERSION. +requires = [ + "setuptools", + "wheel", + "numpy; python_version >= '3.10'", + "numpy==1.19.5; python_version >= '3.8' and python_version < '3.10'", + "numpy==1.15.4; python_version >= '3.7' and python_version < '3.8'", + "numpy==1.12.1; python_version < '3.7'", +] -- GitLab