Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with pybind11 to package external dependencies in the wheel? #22

Open
safijari opened this issue Sep 28, 2018 · 2 comments
Open

Use with pybind11 to package external dependencies in the wheel? #22

safijari opened this issue Sep 28, 2018 · 2 comments

Comments

@safijari
Copy link

So, if this is the wrong place to ask this question you can bump me elsewhere (I just wasn't sure what that elsewhere was). I'm trying to understand how to create a self contained wheel for a private package I'm making. It depends on a 3rd party library for which I have headers and a .so file (but no source). I'm wrapping the libray with pybind11 and so long as the library is installed such that the .so file is in /usr/lib everything goes hunky dory. However I am having the roughest of times figuring out how to include that .so in the package itself.

Milksnake kinda seems like it can help with this but I'm unsure where to start. Am I barking up the wrong tree or have I come to the right place.

@anthrotype
Copy link

if you don't have the sources for this third-party library then i think it's better that you simply include it inside your package using setuptools' package_data, and then you load it using either pkg_resources.resource_filename or importlib_resources.path

@safijari
Copy link
Author

So I'm able to inject the .so files into the wheel with this method, but what I'm struggling with is that pybind11 still looks at /usr/lib for the file. Unsure how to deal with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants