Skip to content

macOS: How to build a wrapper that works with different kinds of Python installations (official, Homebrew, ...)? #5077

Answered by henryiii
petermbauer asked this question in Q&A
Discussion options

You must be logged in to vote

You need to build per Python version. If you use the Limited ABI, which pybind11 doesn't support yet, and nanobind only supports for 3.12+, then you can build once and reuse on later Python versions (this is true for all OS's). You use undefined symbols on linux and macOS, though macOS is better if you can generate the symbol list and give it to the linker. nanobind does this, but pybind11 doesn't currently. And windows you have to give it to the linker, though I think the linker uses the symbol list but doesn't make a hard link. It helps the linker to know if there are undefined symbols when loaded from Python, but you don't want to make a hard link, otherwise you'll depend on the exact …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@petermbauer
Comment options

@petermbauer
Comment options

@henryiii
Comment options

Answer selected by petermbauer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants