Gi,
Gertjan Klein schrieb am 21.04.24 um 16:12:
I'd like to try a tiny change to the CDATA class. In order to try, I have
to be able to build lxml. Unfortunately, on Windows.
Yeah, supporting Windows is everything but trivial due to the general lack
of platform provided build support. Thus, all libraries have to do their
own thing, and bringing that together is not easy. I'm happy myself that
there is a working build setup at all.
If it's a somewhat straightforward change that doesn't need tons of
back-and-forth testing and debugging, and you have a github account, you
could also use their CI service (Github Actions), either on your own
account or in lxml's account via a pull request.
I've downloaded Visual Studio 2019 CE. I created a (Python 3.12) virtual
environment, where I installed Cython (latest version). I cloned lxml
sources from GitHub. I then opened a "Developer command prompt for VS
2019", activated the virtual environment, and typed:
(.venv) C:\Temp\lxml\lxml>python setup.py build_ext -i --with-cython
--static-deps
This downloads the dependencies like libxml2 etc.; this goes without
problems. Then compilation starts, and gives errors:
[...]
Creating library
build\temp.win32-cpython-312\Release\src\lxml\etree.cp312-win_amd64.lib and
object build\temp.win32-cpython-312\Release\src\lxml\etree.cp312-win_amd64.exp
etree.obj : error LNK2001: unresolved external symbol _xmlStrchr
etree.obj : error LNK2001: unresolved external symbol _xmlIOParseDTD
etree.obj : error LNK2001: unresolved external symbol _xmlMemShow
[...]
There are in total 503 unresolved externals. I checked the first one, and
find that is is present in the downloaded libxml2_a.lib, but without the
underscore. The directories of the downloaded libraries are correctly added
to the compiler command line.
It might help to see the command line.
Stefan
_______________________________________________
lxml - The Python XML Toolkit mailing list -- lxml@python.org
To unsubscribe send an email to lxml-le...@python.org
https://mail.python.org/mailman3/lists/lxml.python.org/
Member address: arch...@mail-archive.com