Skip to content

Commit

Permalink
fix the ci pipeline of macOS Python
Browse files Browse the repository at this point in the history
  • Loading branch information
wenbingl committed Jan 25, 2024
1 parent a04860f commit f870ff5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .pyproject/cmdclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,13 @@ def build_cmake(self, extension):
pass

if sys.platform.startswith("darwin"):
cmake_args += ["-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15"]
# Cross-compile support for macOS - respect ARCHFLAGS if set
archs = re.findall(r"-arch (\S+)", os.environ.get("ARCHFLAGS", ""))
if archs:
cmake_args += [
"-DCMAKE_OSX_ARCHITECTURES={}".format(";".join(archs)),
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15"]
"-DCMAKE_OSX_ARCHITECTURES={}".format(";".join(archs))]


# overwrite the Python module info if the auto-detection doesn't work.
# export Python3_INCLUDE_DIRS=/opt/python/cp38-cp38
Expand Down

0 comments on commit f870ff5

Please sign in to comment.