GNOME Bugzilla – Bug 460113
python-bindings should compile the .py modules
Last modified: 2021-07-05 13:22:00 UTC
When compiling the python bindings for libxml2-2.6.27, './configure && make install' installs the .py python modules, but not the .pyc compiled python modules. As a result, when root installs it, users can never get the benefit of compiled modules (since they can't write to the system python libdir). And if root does use them (python can do just-in-time compiling and then automatically saves the compiled module), then those compiled .pyc are never removed by normal package-removal methods (since they weren't installed as part of the normal package-installation methods). The usual approach for python-module build systems is for the "install" target to compile the .py after installing them. Because libxml2 uses a hand-written install target for the .py, the automatic rules for doing that don't happen.
One way to implement this is by importing the py-compile script from a recent automake. Alternately, could write a python one-liner that does the same core function-calls. If you have a preference for which way to do it, I can put together some patches.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxml2/-/issues/ Thank you for your understanding and your help.