Skip to content

Commit

Permalink
Merge pull request kpu#413 from jacobkahn/master
Browse files Browse the repository at this point in the history
Always build a dylib when building Python bindings on macOS
  • Loading branch information
kpu authored Feb 11, 2023
2 parents bcd4af6 + c49a6c5 commit 7d3a2f2
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 7d3a2f2

Please sign in to comment.