diff options
author | Sam James <sam@gentoo.org> | 2024-01-22 05:51:57 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-01-22 05:51:57 +0000 |
commit | 11641c3d40b399e3eacef4cecf256b5f2b4b5aa3 (patch) | |
tree | 13453315649ce1198c3c41ee85034b1aeb54c398 /dev-libs/glib | |
parent | app-emulation/libvirt-glib: Stabilize 4.0.0 arm64, #922586 (diff) | |
download | gentoo-11641c3d40b399e3eacef4cecf256b5f2b4b5aa3.tar.gz gentoo-11641c3d40b399e3eacef4cecf256b5f2b4b5aa3.tar.bz2 gentoo-11641c3d40b399e3eacef4cecf256b5f2b4b5aa3.zip |
dev-libs/glib: fix Python 3.12 build w/o setuptools
Closes: https://bugs.gentoo.org/922654
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/glib')
-rw-r--r-- | dev-libs/glib/files/glib-2.78.4-distutils.patch | 36 | ||||
-rw-r--r-- | dev-libs/glib/glib-2.78.4-r1.ebuild (renamed from dev-libs/glib/glib-2.78.4.ebuild) | 8 |
2 files changed, 44 insertions, 0 deletions
diff --git a/dev-libs/glib/files/glib-2.78.4-distutils.patch b/dev-libs/glib/files/glib-2.78.4-distutils.patch new file mode 100644 index 000000000000..70ceebcf7095 --- /dev/null +++ b/dev-libs/glib/files/glib-2.78.4-distutils.patch @@ -0,0 +1,36 @@ +https://bugs.gentoo.org/922654 +https://gitlab.gnome.org/GNOME/glib/-/issues/3134 +https://gitlab.gnome.org/GNOME/glib/-/commit/6ef967a0f930ce37a8c9b5aff969693b34714291 + +[sam: Trimmed the CI changes.] + +From 6ef967a0f930ce37a8c9b5aff969693b34714291 Mon Sep 17 00:00:00 2001 +From: Jordan Williams <jordan@jwillikers.com> +Date: Fri, 1 Dec 2023 09:53:50 -0600 +Subject: [PATCH] Switch from the deprecated distutils module to the packaging + module + +The distutils module was removed in Python 3.12. +--- + +--- a/gio/gdbus-2.0/codegen/utils.py ++++ b/gio/gdbus-2.0/codegen/utils.py +@@ -19,7 +19,7 @@ + # + # Author: David Zeuthen <davidz@redhat.com> + +-import distutils.version ++import packaging.version + import os + import sys + +@@ -166,4 +166,4 @@ def version_cmp_key(key): + v = str(key[0]) + else: + v = "0" +- return (distutils.version.LooseVersion(v), key[1]) ++ return (packaging.version.Version(v), key[1]) +-- +GitLab + + diff --git a/dev-libs/glib/glib-2.78.4.ebuild b/dev-libs/glib/glib-2.78.4-r1.ebuild index 6fdf95422485..ec81f416256d 100644 --- a/dev-libs/glib/glib-2.78.4.ebuild +++ b/dev-libs/glib/glib-2.78.4-r1.ebuild @@ -51,6 +51,9 @@ BDEPEND=" app-text/docbook-xml-dtd:4.5 ) systemtap? ( >=dev-debug/systemtap-1.3 ) ${PYTHON_DEPS} + $(python_gen_any_dep ' + dev-python/packaging[${PYTHON_USEDEP}] + ') test? ( >=sys-apps/dbus-1.2.14 ) virtual/pkgconfig " @@ -69,8 +72,13 @@ MULTILIB_CHOST_TOOLS=( PATCHES=( "${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch + "${FILESDIR}"/${PN}-2.78.4-distutils.patch ) +python_check_deps() { + python_has_version "dev-python/packaging[${PYTHON_USEDEP}]" +} + pkg_setup() { if use kernel_linux ; then CONFIG_CHECK="~INOTIFY_USER" |