diff --git a/setup.py b/setup.py index 25fe24cb..2554a8f1 100644 --- a/setup.py +++ b/setup.py @@ -104,6 +104,7 @@ def build_extensions(self): env = os.environ.copy() env["PYTHON"] = sys.executable env["PYTHON_INCLUDE"] = f'-I{sysconfig.get_path("include")}' + env["CXX"] = env.get("CXX", "g++") env["CXXFLAGS"] = "-O3 -Bstatic -Bdynamic -std=c++17 " + env.get( "CXXFLAGS", "" ) @@ -133,18 +134,9 @@ def build_extensions(self): subprocess.run(["cat", "config.log"], cwd=FASTJET, check=True) raise - env["ORIGIN"] = "$ORIGIN" # if evaluated, it will still be '$ORIGIN' subprocess.run(["make", "-j"], cwd=FASTJET, env=env, check=True) subprocess.run(["make", "install"], cwd=FASTJET, env=env, check=True) - # Update the environment for fastjet-contrib build - env = os.environ.copy() - env["CXX"] = env.get("CXX", "g++") - env["CXXFLAGS"] = "-O3 -Bstatic -Bdynamic -std=c++17 " + env.get( - "CXXFLAGS", "" - ) - env["LDFLAGS"] = env.get("LDFLAGS", "") - # For aarch64 macOS need to set the LDFLAGS for Homebrew installed # dependencies to be found. However, fastjet-contrib's configure # script does not use/accept LDFLAGS as an argument, and so to get