diff options
author | Hood Chatham <roberthoodchatham@gmail.com> | 2022-06-11 14:09:05 -0700 |
---|---|---|
committer | Hood Chatham <roberthoodchatham@gmail.com> | 2022-06-12 09:29:38 -0700 |
commit | d669e7a716afd8eb5628cae2210d079c76f5b45c (patch) | |
tree | 65d1071da747c712621a9440131010ab849a20fd /numpy/core/setup.py | |
parent | 4cb688938be2ff20bf939c3917fde2f7634f0500 (diff) | |
download | numpy-d669e7a716afd8eb5628cae2210d079c76f5b45c.tar.gz |
ENH: cross compilation: use sysconfig to determine if x86_64 linux
Using `platform` is enquiring about the build system we want to know
about the target system. We can use `sysconfig` for that.
Diffstat (limited to 'numpy/core/setup.py')
-rw-r--r-- | numpy/core/setup.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py index 616a1b37f..543b6ae39 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -1,9 +1,9 @@ import os import sys +import sysconfig import pickle import copy import warnings -import platform import textwrap import glob from os.path import join @@ -79,9 +79,8 @@ def can_link_svml(): """ if NPY_DISABLE_SVML: return False - machine = platform.machine() - system = platform.system() - return "x86_64" in machine and system == "Linux" + platform = sysconfig.get_platform() + return "x86_64" in platform and "linux" in platform def check_svml_submodule(svmlpath): if not os.path.exists(svmlpath + "/README.md"): |