提交 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):
def c_header_dirs(self):
other_dirs = []
alt_inc_dir = os.path.abspath(os.path.normpath(sys.exec_prefix + '/Library/include'))
if os.path.exists(alt_inc_dir) and os.path.isdir(alt_inc_dir):
other_dirs.append(alt_inc_dir)
for dir_to_add in ['Library/include', 'include']:
alt_inc_dir = os.path.abspath(os.path.normpath(sys.exec_prefix + '/' + dir_to_add))
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
def c_lib_dirs(self):
alt_lib_dir = os.path.abspath(os.path.normpath(sys.exec_prefix + '/Library/lib'))
if os.path.exists(alt_lib_dir) and os.path.isdir(alt_lib_dir):
return [alt_lib_dir]
return []
dirs = []
for dir_to_add in ['Library/lib', 'lib']:
alt_lib_dir = os.path.abspath(os.path.normpath(sys.exec_prefix + '/' + dir_to_add))
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):
return ['gpuarray']
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论