Skip to content

Commit

Permalink
Fix linux
Browse files Browse the repository at this point in the history
  • Loading branch information
metab0t committed Mar 10, 2024
1 parent bea65e0 commit b120118
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ def patch_rpath(executable_path: str):
# show the altered rpath
p = subprocess.run(
["otool", "-l", executable_path],
check=True, capture_output=True, text=True,
check=True,
capture_output=True,
text=True,
)
print(f"Output of otool:\n{p.stdout}")
elif platform.system() == "Linux":
Expand All @@ -120,7 +122,9 @@ def patch_rpath(executable_path: str):
# show the altered rpath
p = subprocess.run(
["patchelf", "--print-rpath", executable_path],
check=True, capture_output=True, text=True,
check=True,
capture_output=True,
text=True,
)
print(f"Output of patchelf:\n{p.stdout}")

Expand All @@ -136,6 +140,11 @@ def patch_rpath(executable_path: str):
dirs_exist_ok=True,
)

# In manylinux container, the lib directory will be set as lib64, we need to change it to lib
lib64dir = os.path.join(temp_dir, dist_name, "lib64")
if os.path.exists(lib64dir):
shutil.move(lib64dir, os.path.join(temp_dir, dist_name, "lib"))

# patch rpath
if os.name != "nt":
executable_path = os.path.join(temp_dir, dist_name, "bin", "highs")
Expand Down

0 comments on commit b120118

Please sign in to comment.