python: Port python 3.x module to Windows and improve distutils a bit
Hi,
This MR attempts to improve Windows support for the libxml2 Python module, by:
- Supporting Python 3.x for Windows, since previously only *NIX was supported as system-level APIs are needed for Python 3.x.
- Fix the
tstmem.py
test script, sincelibxml2mod
may be underlibxmlmods
. - Make DLL packaging in
setup.py
more flexible: We now use the options that we specified viaconfigure.js
or CMake to determine which DLLs we want to pack into the installation orbdist*
items, so that we try to avoid excessively packing in DLLs or miss out on required DLLs. Also enable one to change required DLL filenames easier, as different DLLs may be linked in. This is more important for Python 3.8+ where Python requires one to be quite clear on where dependent DLLs are loaded. - Import
setuptools
if found, so that it makes things easier to build wheels.
With blessings, thank you!