forked from pybamm-team/PyBaMM
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rpath for libomp dylib at wheel repair
- Loading branch information
1 parent
b55169c
commit 6fb8ef0
Showing
2 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# A helper script to fix the rpath of the OpenMP dynamic library. This | ||
# is to be used when building the wheels for PyBaMM on macOS (on both | ||
# amd64 and arm64 architectures). | ||
|
||
import os | ||
import subprocess | ||
|
||
homedir = os.path.expanduser("~") | ||
libomp_path = os.path.join(homedir, ".local/lib/libomp.dylib") | ||
|
||
subprocess.run( | ||
[ | ||
"install_name_tool", | ||
"-change", | ||
"/usr/local/lib/libomp.dylib", | ||
libomp_path, | ||
libomp_path, | ||
] | ||
) |