Skip to content

Commit

Permalink
Perform operations for Apple silicon only
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed Sep 15, 2024
1 parent 16ddbe8 commit 6b645ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import os
import pathlib
import platform
import shutil
import subprocess
import sys
Expand Down Expand Up @@ -64,7 +65,7 @@ def build_extensions(self):
# This is a bad hack, and will be alleviated if CMake can be used
# by FastJet and FastJet-contrib.
# c.f. https://github.com/scikit-hep/fastjet/issues/310
if sys.platform == "darwin":
if sys.platform == "darwin" and platform.processor() == "arm":
os.environ["CXXFLAGS"] = (
f"-I{os.environ['HOMEBREW_PREFIX']}/include "
+ os.environ.get("CXXFLAGS", "")
Expand Down Expand Up @@ -137,7 +138,7 @@ def build_extensions(self):
# This is a bad hack, and will be alleviated if CMake can be used
# by FastJet and FastJet-contrib.
# c.f. https://github.com/scikit-hep/fastjet/issues/310
if sys.platform == "darwin":
if sys.platform == "darwin" and platform.processor() == "arm":
# For reasons that are unclear, the LDFLAGS need to be fully
# overridden. It is insufficient to just prepend the Homebrew
# library path to the existing LDFLAGS.
Expand Down

0 comments on commit 6b645ef

Please sign in to comment.