From f48f0ff4d78b15b6028b2cae5a4459df9b2d4f22 Mon Sep 17 00:00:00 2001 From: David Duarte Date: Mon, 26 Feb 2024 22:40:01 +0000 Subject: [PATCH] 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. --- test/setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/setup.py b/test/setup.py index 7cbcc4a..b64f83e 100755 --- a/test/setup.py +++ b/test/setup.py @@ -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' ],