From ecbda8a611bcfb0d63662f08af61b82bee4053bc Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Wed, 2 Jun 2021 13:28:16 -0700 Subject: [PATCH 1/2] Update pyproject.toml --- pyproject.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 01d28777eb47e..624819e436b23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,9 +5,11 @@ requires = [ "setuptools>=38.6.0", "wheel", "Cython>=0.29.21,<3", # Note: sync with setup.py - "numpy==1.17.3; python_version=='3.7'", - "numpy==1.18.3; python_version=='3.8'", - "numpy; python_version>='3.9'", + # Note: ARM64 needs newer numpy + "numpy==1.17.3; python_version=='3.7' and platform_machine!='arm64'", + "numpy==1.18.3; python_version=='3.8' and platform_machine!='arm64'", + "numpy>=1.19.3; python_version>='3.9' and platform_machine!='arm64'", + "numpy>=1.20.0; platform_machine=='arm64'" ] # uncomment to enable pep517 after versioneer problem is fixed. # https://github.com/python-versioneer/python-versioneer/issues/193 From c2e381f360b274b8e9e810e6b81430e11309c59c Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Sat, 5 Jun 2021 09:43:48 -0700 Subject: [PATCH 2/2] Update pyproject.toml --- pyproject.toml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 624819e436b23..8d9963a91290e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,11 +5,17 @@ requires = [ "setuptools>=38.6.0", "wheel", "Cython>=0.29.21,<3", # Note: sync with setup.py - # Note: ARM64 needs newer numpy - "numpy==1.17.3; python_version=='3.7' and platform_machine!='arm64'", - "numpy==1.18.3; python_version=='3.8' and platform_machine!='arm64'", - "numpy>=1.19.3; python_version>='3.9' and platform_machine!='arm64'", - "numpy>=1.20.0; platform_machine=='arm64'" + # 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'" ] # uncomment to enable pep517 after versioneer problem is fixed. # https://github.com/python-versioneer/python-versioneer/issues/193