pyodide/packages/numpy/patches/0002-ENH-cross-compilation-...

43 lines
1.2 KiB
Diff

From 41b21c49e30cf941b511f519593d611483ad956f Mon Sep 17 00:00:00 2001
From: Hood Chatham <roberthoodchatham@gmail.com>
Date: Sat, 11 Jun 2022 14:09:05 -0700
Subject: [PATCH 2/3] 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.
---
numpy/core/setup.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index 6d1d8db4b..ad25774bd 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"):
--
2.25.1