-
Notifications
You must be signed in to change notification settings - Fork 99
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
provide binary wheels for Linux compatible with lxml #316
Comments
These are incompatible with xmlsec, see xmlsec/python-xmlsec#316
@nijel The workaround solution would be to force lxml not to use the pre-compiled wheel:
|
I know the workaround, the problem is that there is no way to tell this inside dependencies. Instead, you need to tell users to not use I'm on Debian 12 (Python 3.11, libxml2 2.9.14, xmlsec1 1.2.37), it happens on GitHub CI environment with Ubuntu 22.04 (any Python version installed by actions/setup-python, libxml 2.9.13, xmlsec1 1.2.33). PS: I'm happy user of https://github.com/pypa/cibuildwheel and https://github.com/pypa/gh-action-pypi-publish to automate all the wheel builds and publishing. |
These are incompatible with xmlsec, see xmlsec/python-xmlsec#316
@nijel You're right, I put it in the todo list for the next release. Hope we can solve it better :) |
@mxamin i like the idea of providing Linux wheels for the next release as well. We are already making the wheels with cibuildwheel, so it's just a matter of distributing them. I can work on a PR to automate attaching the wheels to the release in GitHub and uploading them to PyPI if you would like. |
I could have do it manually (simply downloading the artificats and uploading them to pypi) but I decided not to do it because of libxml2 version check. Assume that lxml wheel is build with version 2.9.x and python-xmlsec with 2.11.x, we would end up with the mismatch error which is not good. So the real problem here is to fix the lxml/python-xmlsec compatibility issue for real :) |
Making the integration with lxml safer, like you are suggesting, would be a win for sure. Even if we do that though, I think there is still a strong argument for providing wheels for Linux. It makes things much easier for end users of the package, especially when installing inside a container where you don't necessarily have all the build tooling available. |
Definitely it would help. I wonder if the created wheels would help in reported cases. I probably check that later. |
I was thinking if it is possible to build a private xmlsec1 against libxml2 from lxml and ship it inside the wheel. |
@nijel would you be able to manually install one of the Linux wheels attached the the release in GitHub https://github.com/xmlsec/python-xmlsec/releases/tag/1.3.14 and see if it solves your issue? The wheels are statically linked against libxml2 and libxmlsec, so I believe it will sort your issue. Those are the wheels we are discussing uploading to pypi. |
This seems to address compatibility with lxml wheel, see xmlsec/python-xmlsec#316
This seems better approach than building lxml which can not be cached. See xmlsec/python-xmlsec#316
Thanks, that seems to work locally just fine. Pushed that to CI now to see the outcome there. |
@nijel yesterday afternoon, after some testing, @mxamin uploaded these same wheels to pypi. You should just be able to install See: I think that satisfies this ticket. |
Is it possible that after this change, I get the Maybe the version check probably can be skipped in case xmlsec is linked statically with the libxml? |
It looks like maybe you were installing
Because This means that either they both need to be installed from wheels, which includes same version of |
Thanks for explanation, it now works for me. Publishing binary wheels while I was testing this in CI made results for me quite unpredictable, but now with wheels-only setup, everything works just fine. Thanks for your effort to make this work! |
Latest python-xmlsec release now at least warns of mismatching libxml2 library version mismatches. See xmlsec/python-xmlsec#316
Latest python-xmlsec release now at least warns of mismatching libxml2 library version mismatches. See xmlsec/python-xmlsec#316
I know this error has been added intentionally to catch other breakages, but is there a way to provide binary wheels that will work with current lxml? So that
pip install lxml xmlsec
will bring working combo.Presently, it doesn't:
The problem is that lxml wheels are built with internal libxml while xmlsec is using system one.
Rebuilding lxml against system libxml does address the issue, but working combo out of the box would be better.
The text was updated successfully, but these errors were encountered: