Skip to content

Commit

Permalink
Fixing the master (#25)
Browse files Browse the repository at this point in the history
* homebrew changed places for library, update

* let's stop building 3.6 and 3.7 because they are end of life

* github action uses legacy dir for homebrew, fix

* change swig ops

* removing python versions
  • Loading branch information
duguyue100 authored Dec 6, 2023
1 parent d5b923e commit db24a67
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 13 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -55,18 +53,26 @@
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"

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=[libcaer_include, python_paths["include"], numpy_include],
library_dirs=[libcaer_lib, python_paths["stdlib"]],
swig_opts=["-I" + libcaer_include],
include_dirs=include_dirs,
library_dirs=library_dirs,
swig_opts=swig_opts,
# extra_compile_args=["-std=c11"],
extra_link_args=["-lcaer"],
)
Expand Down

0 comments on commit db24a67

Please sign in to comment.