From 7f7455fa081da6c34cce0cb43dd9e1de2236a49c Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 20 Aug 2021 22:56:12 -0400 Subject: [PATCH 1/2] REF: use oldest-supported-numpy This code is currently hand-copied from SciPy, now there's a package that exists to do just that. As a bonus, NumPy will no longer need to build wheels on 3.10 (Linux 64-bit only currently) --- pyproject.toml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 03c1485bd4e35..4398046fc4bc7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,17 +5,9 @@ requires = [ "setuptools>=51.0.0", "wheel", "Cython>=0.29.21,<3", # Note: sync with setup.py - # Numpy requirements for different OS/architectures - # Copied from https://github.com/scipy/scipy/blob/master/pyproject.toml (which is also licensed under BSD) - "numpy==1.17.3; python_version=='3.7' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64'", - "numpy==1.18.3; python_version=='3.8' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64'", - "numpy==1.19.3; python_version>='3.9' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64'", - # Aarch64(Python 3.9 requirements are the same as AMD64) - "numpy==1.19.2; python_version=='3.7' and platform_machine=='aarch64'", - "numpy==1.19.2; python_version=='3.8' and platform_machine=='aarch64'", - # Darwin Arm64 - "numpy>=1.20.0; python_version=='3.8' and platform_machine=='arm64' and platform_system=='Darwin'", - "numpy>=1.20.0; python_version=='3.9' and platform_machine=='arm64' and platform_system=='Darwin'" + # Numpy requirements for different OS/architectures, see + # https://github.com/scipy/oldest-supported-numpy/blob/master/setup.cfg + "oldest-supported-numpy>=0.10", ] # uncomment to enable pep517 after versioneer problem is fixed. # https://github.com/python-versioneer/python-versioneer/issues/193 From b37784c36ba15a7ac93e5295137533a4a6dd4723 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Sat, 21 Aug 2021 11:39:18 -0400 Subject: [PATCH 2/2] CI: pin oldest supported NumPy --- .github/workflows/sdist.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sdist.yml b/.github/workflows/sdist.yml index 2e890506073a8..600283193dc6e 100644 --- a/.github/workflows/sdist.yml +++ b/.github/workflows/sdist.yml @@ -58,7 +58,16 @@ jobs: - name: Install pandas from sdist run: | conda list - python -m pip install dist/*.gz + python -m pip install dist/*.gz -v + + - name: Force oldest supported NumPy + run: | + case "${{matrix.python-version}}" in + 3.8) + pip install numpy==1.17.3 ;; + 3.9) + pip install numpy==1.19.3 ;; + esac - name: Import pandas run: |