-
Notifications
You must be signed in to change notification settings - Fork 27
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
availability on pypi #146
Comments
It's been thought of, but is tricky due to the underlying compiled libraries. I think there might be some dynamic linking which makes building wheels hard. Pyn5 is a very similar python binding to an alternative N5 implementation (in rust), with PyPI deployment as a design goal, if you're constrained to using pip-installable packages. |
Do you mean the dependencies or the libraries built by z5 itself? |
Yes, the problem is in dynamic linking to some of the dependencies. This still leaves dynamic linking to the compression libraries at runtime, but this is probably not such a big issue, because these tend to be more stable. Also, one would need to download some build dependencies that are not available on pip ( It would be great to have it on pip, and maybe one could use travis to auto-generate the wheels like here. |
Why was that ever a problem?
pybind11 is available from pypi. https://pypi.org/project/pybind11/ xtensor is a problem. I've submitted a report for xtensor-stack/xtensor-python#219. |
As far as I am aware, boost is not available on pypi, so one would need to rely on the boost being available in the
Good to know.
Ok thanks for raising this. Let's see what's the response is. |
That's right, but also it doesn't matter. Sometimes Python libraries have dependencies outside of the pypi realm. In those cases, the user just has to be told that this software needs to be installed. In many cases (like boost), this can be easily done via the system package manager. (It's always wise to only depend on packages which can be installed easily. xtensor is not one of them.) |
For dynamic linking to boost this is not a good option though, because one needs to have the same boost version that the library was build with: say the pypi version was build with 1.66. Then the system version needs to be exactly 1.66 as well, otherwise symbols won't match up.
I agree, but in conda world it's very easy to install ;). |
You wouldn't upload the wheel binaries but the source code and let pip build and link the package.
👍
In the conda world, yes.
If you want to provide the wheels, no problem! (For non-native Python packages, I usually only upload the sources.tar.gz and let it build on the user system. This way, I avoid version incompatibilities like the boost scenario above.) |
Ok, I see. This would indeed solve the linking issues. Probably a good idea to do it this way for z5 in any case in order to avoid problems with missing compression libraries. (Unfortunately c++ stl is still missing json support and multiarrays, that's why the need for these dependencies arises.) |
Well, I guess you can always put it on pypi right now and say in the readme that the user needs such and such libraries installed. (Most Python-C++ interfacing libraries do that, one of mine is pygalmesh which needs the huge C++ lib CGAL. -- A huge library, but fortunately installable with Debian/Ubuntu.) While not necessary, it'd certainly be good for z5 if all required dependencies were easily installable. |
I get that Boost isn't required anymore, but here's an example of building zmesh with statically linked Boost: https://github.com/seung-lab/zmesh/blob/master/.github/workflows/build_wheels.yml |
Hey @constantinpape, I was wondering whether you are still interested in adding support for building wheels for PyPI. I am currently building a project depending on this and would be interested in having it on PyPI. I have experience with |
Dear @dokempf, |
Ever thought about making z5 available on pypi?
The text was updated successfully, but these errors were encountered: