-
Notifications
You must be signed in to change notification settings - Fork 49
Ship wheel packages for Linux ? #200
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
Comments
Building from source is significantly easier on Linux than on Windows, which is why I implemented the wheel deployments while adding Windows support. If we are going to do it, I would tie this into #192 instead of implementing it in Travis. |
I am building docker images where we pip install gssapi. I don't want to have gcc or krb5-devel inside of them, just krb5-libs and the wheel package if possible. |
Another use case from me: building documentation on ReadTheDocs fails b/c we can't compile gssapi there |
Thanks, that's all good to know. I'm not opposed to doing this, but unfortunately it may take a while for me to get to it. Patches welcome :) |
@frozencemetery I will give it a try if somebody else doesn't beat me to it. |
because they don't ship binary packages on Linux, see pythongssapi/python-gssapi#200
Resolves: pythongssapi#200
manylinux wheels are restricted to an ancient ABI (CentOS 5 or CentOS 6) and very few shared libraries. Unless you want to statically link in KRB5 and GSSAPI, it is very unlikely that you can get manylinux to work for python-gssapi |
The end result of what's in #205 now is:
As @tiran explained above, this is because Python prefers manylinux wheels. Since we can't staticly link in krb5 because it won't pass auditwheel, we need to be using manylinux2014 wheels. (Cred store extensions are added in 1.11, so they're not in el<=6, and I don't want to provide a version of python-gssapi without them.) |
https://www.python.org/dev/peps/pep-0599/#the-manylinux2014-policy Build a wheel on CentOS 7 manylinux builder
Inspect the wheel
Repair and try again
The resulting wheel works on my Fedora 32 box. But technically it is not a correct wheel. Please do not upload any binary wheels to PyPI until we have done thorough testing. I strongly recommend to upload any binary wheels to https://test.pypi.org/ for now and test them there. |
Cython does not support PEP 384 limited API yet. There is some ongoing work to support it in 3.0.0 dev (CYTHON_LIMITED_API, Py_LIMITED_API). This means that you'd have to build a binary wheel for every Python version and CPU arch. |
Resolves: pythongssapi#200
Resolves: pythongssapi#200
Resolves: pythongssapi#200
The binary wheel includes
|
@tiran depending on linker options it may work better or worse, isn't there a way in wheels to tell to try to load the system library first and fall back to the embedded one only if a system one is not found ? |
As for MEMORY cache, it uses thread local storage, so it might create silos between parts of the code using the two different libraries |
Right, the data structure(s) holding the MEMORY ccaches aren't exported, so I think it will just silo. @tiran, it looks like the system copy is dragged in by ldap, right? So unless there's a way to ask for the system copy preferentially, I think we're going to end up with both... |
@atodorov The feeling I'm getting is that we're somewhat concerned about what happens when we try to provide manylinux wheels. I'm not sure I want to be debugging some of the potential problems we haven't ruled out, and the known issue around MEMORY ccaches is probably not good either. One thing we could do is ship normal Linux wheels (i.e., not manylinux) from our github page as release artifacts. So they can't be on pypi, but you could still install them manually and not need C compiler etc.. Is this something that would be helpful to you? @tiran, same question, but for IPA's use case? Also, any chance of a centos8-based manylinux having krb5 libraries in the "okay to link" set? |
Which Python version and OS version are these going to be built with? I have the feeling that unless consumers use the same this will be prone to errors. Also I know you can manually install packages from other sources than PyPI but IDK how to specify the dependencies in such a way that they are transparent to the user. Sounds like it won't work very well for my intended purposes. |
Another note: IDK what manylinux packages are, nor how they are built but isn't this issue similar on Windows ? E.g. why is that on Windows we can ship a binary wheel and more or less expect it to work across various OS (Python?) versions but not on Linux ? |
The situation on Windows is different. There is just one distribution (Microsoft Windows) with several versions and a strict backwards compatibility policy. DLL resolver works differently than on Linux, too. There are tons of Linux distributions and each distribution has multiple versions with or without backwards compatibility. PyPI does not permit uploads of distribution specific packages. Only manylinux packages are allowed. Linux installations may or may not have |
Based on the conversation above this is not really possible to do for Linux, at least for the releases on PyPI. I personally don't think it's feasible to host our own wheels due to complexities of trying to make a "universal" wheel for Linux. Unless this landscape changes I don't think anything else can be done for Linux. Thanks to everyone for investigating this feature and picking out the gritty parts here. |
Shouldn't https://github.com/pypa/cibuildwheel solve this problem now with a low effort? |
No the issue isn’t building the wheel it’s the fact that on Linux it needs to essentially ship it’s own libgssapi library from either MIT or Heimdal. This will be different from the system provided library that most other tools are linked to causing problems when a process tries to link multiple copies of the same library (at different versions). This is a requirement of manylinux wheels uploaded to PyPI and we can’t just have an external dep on libgssapi/libkrb5 because:
|
libkrb5 / libgssapi use process-wide global states. For example one part of our application acquires credentials and stores it in global state. Another part of the application can use the credentials to log into a database. My comment #200 (comment) shows an example with a binary wheel of python-gssapi and a system build of python-ldap. As you can see there are two copies of libkrb5 in the process space, the bundled copy from python-gssapi and |
Thanks for the detailed explanation 👍 Makes sense now. |
What went wrong?
How do maintainers feel about providing wheel packages for Linux? Maybe 64bit only, same Python versions for which you build the Windows wheel packages ?
The text was updated successfully, but these errors were encountered: