Skip to content

Commit

Permalink
try prepending LDFLAGS instead of overwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed Sep 15, 2024
1 parent 9d84215 commit b35de3f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ def build_extensions(self):
f"-I{os.environ['HOMEBREW_PREFIX']}/include "
+ os.environ.get("CXXFLAGS", "")
)
# os.environ["LDFLAGS"] = (
# os.environ.get("LDFLAGS", "")
# + f" -L{os.environ['HOMEBREW_PREFIX']}/lib"
# )
os.environ["LDFLAGS"] = (
f"-L{os.environ['HOMEBREW_PREFIX']}/lib "
+ os.environ.get("LDFLAGS", "")
)
# 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.
os.environ["LDFLAGS"] = f"-L{os.environ['HOMEBREW_PREFIX']}/lib"
# os.environ["LDFLAGS"] = f"-L{os.environ['HOMEBREW_PREFIX']}/lib"
# Pick up a Conda environment if it is active
if "CONDA_PREFIX" in os.environ and os.environ["CONDA_PREFIX"]:
os.environ["CXXFLAGS"] = (
Expand Down

0 comments on commit b35de3f

Please sign in to comment.