Skip to content

Commit

Permalink
read archflags and forward it to cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmuhs committed Jan 14, 2024
1 parent 6b1a4a5 commit 23e6ecd
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,15 @@ def save_options(self):
def run(self):
self.load_options()

print("CMAKE_OSX_ARCHITECTURES: " +
os.environ.get("CMAKE_OSX_ARCHITECTURES", "not set"))
print("ARCHFLAGS: " + os.environ.get("ARCHFLAGS", "not set"))
print("_PYTHON_HOST_PLATFORM: " +
os.environ.get("_PYTHON_HOST_PLATFORM", "not set"))
# cross-compilation support for cibuildwheel for building M1 targets on x86_64
osx_architectures = None
archflags = os.environ.get("ARCHFLAGS")
if archflags is not None:
osx_architectures = ";".join(
set(archflags.split()) & {"x86_64", "arm64"})

self.cmake_flags = cmake_configure(keyvi_build_dir, self.options['mode'], self.options.get(
'zlib_root'), additional_compile_flags)
'zlib_root'), additional_compile_flags, osx_architectures)
self.save_options()
self.parent.run(self)

Expand Down

0 comments on commit 23e6ecd

Please sign in to comment.