From fa010991b8f229ef5658ac266c6c96feabf440ab Mon Sep 17 00:00:00 2001 From: Yuhuang Hu Date: Wed, 6 Dec 2023 14:28:52 +0800 Subject: [PATCH 1/5] homebrew changed places for library, update --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 2c7c46d..4fb842b 100644 --- a/setup.py +++ b/setup.py @@ -55,8 +55,8 @@ if os.uname()[1] == "raspberrypi": libcaer_lib = "/usr/lib/arm-linux-gnueabihf" elif platform == "darwin": - libcaer_include = "/usr/local/include" - libcaer_lib = "/usr/local/lib" + libcaer_include = "/opt/homebrew/include" + libcaer_lib = "/opt/homebrew/lib" elif "win" in platform: libcaer_include = "C:/msys64/mingw64/include" libcaer_lib = "C:/msys64/mingw64/lib" From b4be5b7667c15e49a5c9553f30cd39e7abea87a4 Mon Sep 17 00:00:00 2001 From: Yuhuang Hu Date: Wed, 6 Dec 2023 14:30:56 +0800 Subject: [PATCH 2/5] let's stop building 3.6 and 3.7 because they are end of life --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0df1c73..3fdabdc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v2 From 92c4d5643e91c394be8116a192b0e65d8d8ba5c1 Mon Sep 17 00:00:00 2001 From: Yuhuang Hu Date: Wed, 6 Dec 2023 16:24:12 +0800 Subject: [PATCH 3/5] 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"], From cc7a1ea7143e6f0cb154770371b402db27b34de4 Mon Sep 17 00:00:00 2001 From: Yuhuang Hu Date: Wed, 6 Dec 2023 17:30:44 +0800 Subject: [PATCH 4/5] change swig ops --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 89ac9b4..eb21e07 100644 --- a/setup.py +++ b/setup.py @@ -63,16 +63,18 @@ include_dirs = [libcaer_include, python_paths["include"], numpy_include] library_dirs = [libcaer_lib, python_paths["stdlib"]] +swig_opts = ["-I" + libcaer_include] if platform == "darwin": include_dirs += ["/usr/local/include"] library_dirs += ["/usr/local/lib"] + swig_opts += ["-I/usr/local/include"] libcaer_wrap = Extension( name="pyaer._libcaer_wrap", sources=["./pyaer/pyflags.i"], include_dirs=include_dirs, library_dirs=library_dirs, - swig_opts=["-I" + libcaer_include], + swig_opts=swig_opts, # extra_compile_args=["-std=c11"], extra_link_args=["-lcaer"], ) From eae60e735849f7e0088ca0992ba4e74789a398a7 Mon Sep 17 00:00:00 2001 From: Yuhuang Hu Date: Wed, 6 Dec 2023 17:37:26 +0800 Subject: [PATCH 5/5] removing python versions --- setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup.py b/setup.py index eb21e07..c7ccea6 100644 --- a/setup.py +++ b/setup.py @@ -20,8 +20,6 @@ Intended Audience :: Science/Research Natural Language :: English Operating System :: OS Independent -Programming Language :: Python :: 3.6 -Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10