diff --git a/pyproject.toml b/pyproject.toml index a59ec013..a0ac7a5d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,5 +3,12 @@ requires = ["setuptools", "six", "wheel", "numpy; python_version=='2.7'", - "oldest-supported-numpy; python_version>='3.0'" ] +# There is no way to compile for versions < 1.25 and up to 2. +# See https://numpy.org/doc/2.0/dev/depending_on_numpy.html +# +# This gives you all versions < 2.0 +# "oldest-supported-numpy; python_version>='3.0'" ] +# +# This gives all versions > 1.25 + "numpy>=2.0.0rc1; python_version>='3.0'" ] build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index fe9445a0..c003b8ff 100644 --- a/setup.py +++ b/setup.py @@ -142,7 +142,8 @@ def build_extension(self, ext): minimal = [ # can't compile without this "six", - "numpy", + 'numpy ; python_version < "3"', + 'numpy>=1.23.5 ; python_version >= "3"', "setuptools", ]