Skip to content

Commit

Permalink
Update to latest aksetup
Browse files Browse the repository at this point in the history
Includes changes equivalent to inducer/pycuda#423

Co-authored-by: Antoine Martin <antoine@xpra.org>
  • Loading branch information
inducer and totaam committed Aug 28, 2023
1 parent e83b99a commit 7c196bc
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions aksetup_helper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import sys
try:
from setuptools import Extension
Expand Down Expand Up @@ -42,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")


Expand Down Expand Up @@ -256,7 +260,7 @@ def expand_options(options):


class ConfigSchema:
def __init__(self, options, conf_file="siteconf.py", conf_dir="."):
def __init__(self, options, conf_file="siteconf.py", conf_dir=os.path.dirname(__file__)):
self.optdict = dict((opt.name, opt) for opt in options)
self.options = options
self.conf_dir = conf_dir
Expand Down Expand Up @@ -936,7 +940,7 @@ def has_flag(compiler, flagname):
def cpp_flag(compiler):
"""Return the -std=c++[11/14] compiler flag.
The c++14 is prefered 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"
Expand Down

0 comments on commit 7c196bc

Please sign in to comment.