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

Building lxml from source #26

Closed
lopuhin opened this issue Oct 27, 2021 · 3 comments
Closed

Building lxml from source #26

lopuhin opened this issue Oct 27, 2021 · 3 comments

Comments

@lopuhin
Copy link

lopuhin commented Oct 27, 2021

Hi, thanks for a super promising project!

To test some stuff, I'd like to build lxml from source, as I understand it required some fixes, would you mind releasing the patched lxml source? For reference, the first error when building lxml from PyPI is

gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -I/usr/include/libxml2 -Isrc -Isrc/lxml/includes -I/some/path/nogil/include -I/usr/local/include/python3.9 -c src/lxml/etree.c -o build/temp.linux-x86_64-3.9/src/lxml/etree.o -w
src/lxml/etree.c: In function ‘__pyx_tp_dealloc_4lxml_5etree__LogEntry’:
src/lxml/etree.c:221006:5: error: lvalue required as increment operand
    ++Py_REFCNT(o); 
    ^~
@colesbury
Copy link
Owner

The lxml wheel was built directly from the 4.6.3 source release on PyPI. No changes were necessary. For reference, the equivalent line from the source release looks like:

__Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);

The script used to build the wheel is here:
https://github.com/colesbury/nogil-install/blob/master/pip/build-lxml-wheel.sh

If you are building from the GitHub sources, you may need to update your Cython installation.

@lopuhin
Copy link
Author

lopuhin commented Oct 27, 2021

Thank you, this makes sense - my bad not checking a more recent version. pip install lxml --no-binary lxml worked for me 👍

The script used to build the wheel is here:
https://github.com/colesbury/nogil-install/blob/master/pip/build-lxml-wheel.sh

That gives 404 for me.

@lopuhin lopuhin closed this as completed Oct 27, 2021
@colesbury
Copy link
Owner

That gives 404 for me.

Ooops. The project was still private. I've made it public now.

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