Skip to content

Ctypes and editable mode #653

Answered by keturn
peppedilillo asked this question in Q&A
Jul 31, 2024 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

I think the trick here is to use importlib.resources instead of __file__:

importlib.resources.files(__package__).joinpath(".sharedlibs/libp-focus.so")

meson-python's editable-mode hooks will resolve that to the build directory.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@eli-schwartz
Comment options

@rgommers
Comment options

Answer selected by rgommers
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants