On 19/05/2021 10:01, Matthias Klose wrote:
On 11/30/20 2:36 PM, Emilio Pozuelo Monfort wrote:
Source: lxml
Version: 4.6.1-1
Severity: normal
Tags: patch
Hi,
The attached patch runs the test suite for each supported python
version. It'd be good to do that to ensure lxml's funcionality.
The patch needs to do an in-tree build so that etree.so can be found.
I couldn't find a workaround for that but if that's a blocker I could
investigate further to avoid that in-tree build.
do we get that "for free" when using pybuild for the build?
pybuild also does out of tree builds (for py3.* and for py3.*-dbg). The same
problem arises, I somehow can't get the out of tree etree.so picked up (setting
up PYTHONPATH), perhaps because some files are being read from src/lxml/*.py
(package lxml), while others (etree.so) need to be read from
.pybuild/cpython3_3.9/build/lxml/ (also package lxml).
This seems to work:
cp .pybuild/cpython3_3.9/build/lxml/etree.cpython-39-x86_64-linux-gnu.so
src/lxml/etree.so
cp .pybuild/cpython3_3.9/build/lxml/objectify.cpython-39-x86_64-linux-gnu.so
src/lxml/objectify.so
python3.9 ./test.py
Skipping tests in lxml.cssselect - external cssselect package is not installed
Comparing with ElementTree 1.3.0
TESTED VERSION: 4.6.1
Python: sys.version_info(major=3, minor=9, micro=2,
releaselevel='final', serial=0)
lxml.etree: (4, 6, 1, 0)
libxml used: (2, 9, 10)
libxml compiled: (2, 9, 10)
libxslt used: (1, 1, 34)
libxslt compiled: (1, 1, 34)
FS encoding: utf-8
Default encoding: utf-8
Max Unicode: 1114111
----------------------------------------------------------------------
Ran 1938 tests in 3.742s
...but it's still somewhat hacky. Perhaps more modules need to be listed in
setupinfo.py, and not just the compiled ones, so that src/*.py end up in
.pybuild/cpython3_3.9/build/ and we don't have compiled and non-compiled modules
split across two dirs? Or maybe there's something else I have missed that can be
done to load the extension.
Cheers,
Emilio