diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 33f250c..b9e612b 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -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" diff --git a/SConstruct b/SConstruct index 463c5e6..3fe4232 100644 --- a/SConstruct +++ b/SConstruct @@ -5,9 +5,11 @@ 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 = [ @@ -15,12 +17,10 @@ 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 += [ @@ -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"]