Skip to content

Commit

Permalink
make it possible to compile from sources against numpy on macOS aarch…
Browse files Browse the repository at this point in the history
…64 (#475)
  • Loading branch information
skvark committed May 1, 2021
1 parent 4262df8 commit aa26990
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Expand Up @@ -3,6 +3,7 @@ requires = [
"setuptools", "wheel", "scikit-build", "cmake", "pip",
"numpy==1.13.3; python_version=='3.6' and platform_machine != 'aarch64'",
"numpy==1.19.3; python_version>='3.6' and sys_platform == 'linux' and platform_machine == 'aarch64'",
"numpy==1.20.1; python_version>='3.6' and sys_platform == 'darwin' and platform_machine == 'aarch64'",
"numpy==1.14.5; python_version=='3.7' and platform_machine != 'aarch64'",
"numpy==1.17.3; python_version=='3.8' and platform_machine != 'aarch64'",
"numpy==1.19.3; python_version>='3.9' and platform_machine != 'aarch64'"
Expand Down
8 changes: 6 additions & 2 deletions setup.py
Expand Up @@ -31,10 +31,14 @@ def main():
if sys.version_info[:2] >= (3, 9):
minimum_supported_numpy = "1.19.3"

# arm64 is a special case
if sys.version_info[:2] >= (3, 6) and platform.machine() == "aarch64":
# linux arm64 is a special case
if sys.platform.startswith("linux") and sys.version_info[:2] >= (3, 6) and platform.machine() == "aarch64":
minimum_supported_numpy = "1.19.3"

# macos arm64 is a special case
if sys.platform == "darwin" and sys.version_info[:2] >= (3, 6) and platform.machine() == "aarch64":
minimum_supported_numpy = "1.20.1"

numpy_version = "numpy>=%s" % minimum_supported_numpy

python_version = cmaker.CMaker.get_python_version()
Expand Down

0 comments on commit aa26990

Please sign in to comment.