From 6e85c04ad50eaf5d0b60b493046fb99909c48e1a Mon Sep 17 00:00:00 2001 From: Guillaume Lemaitre Date: Tue, 25 Oct 2022 08:12:20 +0200 Subject: [PATCH] MAINT force NumPy version for building scikit-learn for CPython 3.10 in Windows (#24742) Co-authored-by: Olivier Grisel Co-authored-by: Thomas J. Fan --- pyproject.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9b38a78966358..9ad929898f946 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,12 @@ requires = [ # wheels on PyPI # # see: https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg - "oldest-supported-numpy", + "oldest-supported-numpy; python_version!='3.10' or platform_system!='Windows' or platform_python_implementation=='PyPy'", + # For CPython 3.10 under Windows, SciPy requires NumPy 1.22.3 while the + # oldest supported NumPy is defined as 1.21.6. We therefore need to force + # it for this specific configuration. For details, see + # https://github.com/scipy/scipy/blob/c58b608c83d30800aceee6a4dab5c3464cb1de7d/pyproject.toml#L38-L41 + "numpy==1.22.3; python_version=='3.10' and platform_system=='Windows' and platform_python_implementation != 'PyPy'", "scipy>=1.3.2", ]