Skip to content
Snippets Groups Projects

[cmake] Force ".so" suffix for pybind11 module libraries on macOS

Merged Timo Koch requested to merge feature/python-force-library-so-suffix-for-macos into master
All threads resolved!

The issue is discussed in this old thread on stackoverflow: https://stackoverflow.com/questions/2488016/how-to-make-python-load-dylib-on-osx

Somehow Python refuses to import dynamic libraries with the suffix .dylib (I get an import error) which is the common suffix for shared libs in macOS. Telling CMake to use .so instead as suggested in the stackoverflow thread works for me.

The Python libs on for my Python 3.7 from homebrew all have .so endings just like in the stackoverflow answer.

Fixes #201 (closed)

Edited by Timo Koch

Merge request reports

Pipeline #28013 passed

Pipeline passed for eefd7050 on feature/python-force-library-so-suffix-for-macos

Approval is optional

Merged by Andreas DednerAndreas Dedner 4 years ago (Jun 29, 2020 2:38pm UTC)

Merge details

Pipeline #28078 passed

Pipeline passed for bccda895 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading