Skip to content

Commit

Permalink
fix macos
Browse files Browse the repository at this point in the history
  • Loading branch information
AWehrhahn committed Apr 4, 2022
1 parent fa1d8be commit f2ed48e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/pysme/smelib/libtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import subprocess
import sys
import zipfile
from os.path import basename, dirname, exists, join
from os.path import basename, dirname, exists, join, realpath

import wget

Expand Down Expand Up @@ -69,6 +69,17 @@ def download_libsme(loc=None):

os.remove(fname)

if system in ["macos"]:
# Need to adjust the install_names in the dylib
fname = realpath(get_full_libfile())
logger.critical(fname)
sp = subprocess.run(
["install_name_tool", "-id", fname, fname], capture_output=True
)
logger.critical(sp.stdout.decode())
logger.critical(sp.stderr.decode())
sp.check_returncode()


def compile_interface():
"""
Expand Down

0 comments on commit f2ed48e

Please sign in to comment.