Skip to content

Commit

Permalink
fix: setup.py was not compling AS wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed Jun 25, 2021
1 parent 3c3bf40 commit 453d1fc
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,16 @@ def build_extension(self, ext):
if "CMAKE_BUILD_PARALLEL_LEVEL" not in os.environ:
build_args += ["-j", str(multiprocessing.cpu_count())]

if (
platform.system() == "Darwin"
and "MACOSX_DEPLOYMENT_TARGET" not in os.environ
):
cmake_args += ["-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9"]
if platform.system() == "Darwin":
if "MACOSX_DEPLOYMENT_TARGET" not in os.environ:
cmake_args += ["-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9"]

# Cross-compile support for macOS
archs = re.findall(r"-arch (\S+)", os.environ.get("ARCHFLAGS", ""))
if archs:
cmake_args.append(
"-DCMAKE_OSX_ARCHITECTURES:STRING={0}".format(";".join(archs))
)

if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)
Expand Down

0 comments on commit 453d1fc

Please sign in to comment.