diff --git a/setup.py b/setup.py index 4578b426..8e237a6f 100644 --- a/setup.py +++ b/setup.py @@ -96,7 +96,7 @@ def build_extensions(self): env = os.environ.copy() env["CXX"] = env.get("CXX", "g++") - env["LDFLAGS"] = env.get("LDFLAGS", "") + f" -Wl,-rpath,{_rpath}" + env["LDFLAGS"] = env.get("LDFLAGS", "") 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)