From d55d83e52882feb41d1c2440b7b1449e6e6d108a Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Sun, 15 Sep 2024 14:56:03 -0500 Subject: [PATCH] prepend don't overwrite CXXFLAGS --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b7a24c47..85e53ff4 100644 --- a/setup.py +++ b/setup.py @@ -97,7 +97,7 @@ def build_extensions(self): env = os.environ.copy() env["PYTHON"] = sys.executable env["PYTHON_INCLUDE"] = f'-I{sysconfig.get_path("include")}' - env["CXXFLAGS"] = "-O3 -Bstatic -Bdynamic -std=c++17" + env["CXXFLAGS"] = "-O3 -Bstatic -Bdynamic -std=c++17 " + env.get("CXXFLAGS", "") env["LDFLAGS"] = env.get("LDFLAGS", "") + f" -Wl,-rpath,{_rpath}" env["ORIGIN"] = "$ORIGIN" # if evaluated, it will still be '$ORIGIN'