Skip to content

Commit

Permalink
Always build a dylib when building Python bindings on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobkahn committed Feb 11, 2023
1 parent bcd4af6 commit c49a6c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ CMakeCache.txt
CTestTestfile.cmake
DartConfiguration.tcl
Makefile
*.egg-info/
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ def compile_test(header, library):
ARGS.append('-DHAVE_CLOCKGETTIME')
elif platform.system() == 'Darwin':
LIBS = ['c++']
# Build a dylib on macOS
import sysconfig
vars = sysconfig.get_config_vars()
vars['LDSHARED'] = vars['LDSHARED'].replace('-bundle', '-dynamiclib')
else:
LIBS = []

Expand Down

0 comments on commit c49a6c5

Please sign in to comment.