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