Skip to content

Commit

Permalink
Merge pull request #6 from ldorigo/patch-1
Browse files Browse the repository at this point in the history
Made compatible with macOS mojave
  • Loading branch information
soldni authored May 1, 2019
2 parents ff44c49 + 9890bbb commit f007929
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ def get_swigdir():
# need iconv too but without proper -L adding -liconv here won't always work
libs = []

if sys.platform.startswith("darwin"):
# On recent macos versions (mojave) it is necessary to specify that libc++ is used instead of libstdc++.
# Furthermore, '-Wl,-undefined,dynamic_lookup' is necessary to link the right libraries.
libs += ["-stdlib=libc++", '-Wl,-undefined,dynamic_lookup']
extra_compile_args = ["-stdlib=libc++"]


simstring_module = Extension(
'_simstring',
sources = [
Expand Down

0 comments on commit f007929

Please sign in to comment.