From 92c4d5643e91c394be8116a192b0e65d8d8ba5c1 Mon Sep 17 00:00:00 2001 From: Yuhuang Hu Date: Wed, 6 Dec 2023 16:24:12 +0800 Subject: [PATCH] github action uses legacy dir for homebrew, fix --- setup.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 4fb842b..89ac9b4 100644 --- a/setup.py +++ b/setup.py @@ -61,11 +61,17 @@ libcaer_include = "C:/msys64/mingw64/include" libcaer_lib = "C:/msys64/mingw64/lib" +include_dirs = [libcaer_include, python_paths["include"], numpy_include] +library_dirs = [libcaer_lib, python_paths["stdlib"]] +if platform == "darwin": + include_dirs += ["/usr/local/include"] + library_dirs += ["/usr/local/lib"] + libcaer_wrap = Extension( name="pyaer._libcaer_wrap", sources=["./pyaer/pyflags.i"], - include_dirs=[libcaer_include, python_paths["include"], numpy_include], - library_dirs=[libcaer_lib, python_paths["stdlib"]], + include_dirs=include_dirs, + library_dirs=library_dirs, swig_opts=["-I" + libcaer_include], # extra_compile_args=["-std=c11"], extra_link_args=["-lcaer"],