Skip to content

Commit

Permalink
fix all
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime-desroches committed Jul 18, 2024
1 parent a4f1977 commit b3499f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
CIBW_BUILD: "${{ matrix.python.cp }}-${{ matrix.platform.target }}"
CIBW_ARCHS: "${{ matrix.platform.arch }}"
CIBW_BEFORE_ALL_LINUX: "dnf install -y clang libffi-devel eigen3-devel python${{ matrix.python.py }}-devel"
CIBW_BEFORE_BUILD_MACOS: "brew install eigen && brew install --cask gcc-arm-embedded && brew install gcc@13 && brew info eigen"
CIBW_BEFORE_BUILD_MACOS: "brew install eigen && brew install --cask gcc-arm-embedded && brew install gcc@13"
14 changes: 6 additions & 8 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ import sysconfig
import numpy as np

arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
if platform.system() == "Darwin":
arch = "Darwin"

common = ''
python_path = sysconfig.get_paths()['include']
py_include = sysconfig.get_paths()['include']

libpath = []
cpppath = [
'#',
'#rednose',
'#rednose/examples/generated',
'/usr/lib/include',
python_path,
py_include,
np.get_include(),
]

print('AAAAA:', arch)
#if platform.processor() == "arm":
if arch == "Darwin":
brew_prefix = subprocess.check_output(['brew', '--prefix'], encoding='utf8').strip()
libpath += [
Expand Down Expand Up @@ -56,16 +56,14 @@ env = Environment(
# Cython build enviroment
envCython = env.Clone()
envCython["CCFLAGS"] += ["-Wno-#warnings", "-Wno-shadow", "-Wno-deprecated-declarations"]
envCython["CPPPATH"] += [py_include, np.get_include()]

envCython["LIBS"] = []
#if platform.processor() == "arm":
if arch == "Darwin":
print('aaaaaaAAAAA:', arch)
envCython["CPPPATH"] += [python_path, np.get_include()]
envCython["LINKFLAGS"] = ["-bundle", "-undefined", "dynamic_lookup"]
elif arch == "aarch64":
envCython["LINKFLAGS"] = ["-shared"]
envCython["LIBS"] = [os.path.basename(python_path)]
envCython["LIBS"] = [os.path.basename(py_include)]
else:
envCython["LINKFLAGS"] = ["-pthread", "-shared"]

Expand Down

0 comments on commit b3499f7

Please sign in to comment.