Skip to content

Switch from the Python distutils module to the packaging module

The deprecated distutils module was removed in Python 3.12. This PR fixes glib to be compatible with Python 3.12 by replacing the distutils module with the packaging module. The Python version requirement has been bumped from 3.5 to 3.7, the earliest version that supports the packaging module. The packaging module must be installed via pip.

Note that Meson version 1.2.3 is required to build with Python 3.12, since earlier versions use the distutils Python module. I wasn't sure if I should bump the minimum Meson version in this scenario.

Fixes #3134 (closed)

Merge request reports