43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
From b5059d4a73f982db90f136fda0073dcdc83f3fd2 Mon Sep 17 00:00:00 2001
|
|
From: Andreas Kloeckner <inform@tiker.net>
|
|
Date: Mon, 28 Aug 2023 12:03:49 -0500
|
|
Subject: [PATCH] Update to latest aksetup
|
|
|
|
Includes changes equivalent to https://github.com/inducer/pycuda/pull/423
|
|
|
|
Co-authored-by: Antoine Martin <antoine@xpra.org>
|
|
---
|
|
aksetup_helper.py | 13 ++++++++-----
|
|
1 file changed, 8 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/aksetup_helper.py b/aksetup_helper.py
|
|
index 89e66da38..1acc8f6d5 100644
|
|
--- a/aksetup_helper.py
|
|
+++ b/aksetup_helper.py
|
|
@@ -43,10 +43,13 @@ def setup(*args, **kwargs):
|
|
|
|
|
|
def get_numpy_incpath():
|
|
- from imp import find_module
|
|
- # avoid actually importing numpy, it screws up distutils
|
|
- file, pathname, descr = find_module("numpy")
|
|
- from os.path import join
|
|
+ from os.path import join, basename
|
|
+ from importlib.util import find_spec
|
|
+ origin = find_spec("numpy").origin
|
|
+ if origin is None:
|
|
+ raise RuntimeError("origin of numpy package not found")
|
|
+
|
|
+ pathname = basename(origin)
|
|
return join(pathname, "core", "include")
|
|
|
|
|
|
@@ -937,7 +940,7 @@ def has_flag(compiler, flagname):
|
|
def cpp_flag(compiler):
|
|
"""Return the -std=c++[11/14] compiler flag.
|
|
|
|
- The c++14 is preferred over c++11 (when it is available).
|
|
+ C++14 is preferred over C++11 (when it is available).
|
|
"""
|
|
if has_flag(compiler, "-std=gnu++14"):
|
|
return "-std=gnu++14"
|