提交 38e49e0a authored 作者: notoraptor's avatar notoraptor

Extend checking to make it work on Windows and also on Linux.

上级 badee6f0
...@@ -473,16 +473,19 @@ class GpuArrayType(Type): ...@@ -473,16 +473,19 @@ class GpuArrayType(Type):
def c_header_dirs(self): def c_header_dirs(self):
other_dirs = [] other_dirs = []
alt_inc_dir = os.path.abspath(os.path.normpath(sys.exec_prefix + '/Library/include')) for dir_to_add in ['Library/include', 'include']:
if os.path.exists(alt_inc_dir) and os.path.isdir(alt_inc_dir): alt_inc_dir = os.path.abspath(os.path.normpath(sys.exec_prefix + '/' + dir_to_add))
other_dirs.append(alt_inc_dir) if os.path.exists(alt_inc_dir) and os.path.isdir(alt_inc_dir):
other_dirs.append(alt_inc_dir)
return [pygpu.get_include(), np.get_include()] + other_dirs return [pygpu.get_include(), np.get_include()] + other_dirs
def c_lib_dirs(self): def c_lib_dirs(self):
alt_lib_dir = os.path.abspath(os.path.normpath(sys.exec_prefix + '/Library/lib')) dirs = []
if os.path.exists(alt_lib_dir) and os.path.isdir(alt_lib_dir): for dir_to_add in ['Library/lib', 'lib']:
return [alt_lib_dir] alt_lib_dir = os.path.abspath(os.path.normpath(sys.exec_prefix + '/' + dir_to_add))
return [] if os.path.exists(alt_lib_dir) and os.path.isdir(alt_lib_dir):
dirs.append(alt_lib_dir)
return dirs
def c_libraries(self): def c_libraries(self):
return ['gpuarray'] return ['gpuarray']
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论