test: Add numpy include path

test/setup.py currently expects the numpy header to be in the
system include path. This is not always the case,
numpy.get_include() is used to add the include path for those cases.
This commit is contained in:
David Duarte
2024-02-26 22:40:01 +00:00
committed by Antoine SOULIER
parent 998150919d
commit f48f0ff4d7

View File

@@ -17,6 +17,7 @@
from setuptools import setup, Extension
import os, sys, glob
import numpy
if len(sys.argv) <= 1:
sys.argv = sys.argv + [
@@ -34,7 +35,7 @@ depends = [ 'ctypes.h' ] + \
glob.glob(INC_DIR + os.sep + '*.h') + \
glob.glob(SRC_DIR + os.sep + '*.[c,h]')
includes = [ SRC_DIR, INC_DIR ]
includes = [ SRC_DIR, INC_DIR, numpy.get_include() ]
extension = Extension('lc3',
extra_compile_args = [ '-std=c11', '-ffast-math' ],