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 c1f6a4d
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
from __future__ import print_function

import multiprocessing
import os
import platform
import re
import shutil
import subprocess
import sys
import multiprocessing
import shutil

import setuptools
import setuptools.command.build_ext
Expand Down Expand Up @@ -133,11 +134,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 c1f6a4d

Please sign in to comment.