summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2020-08-25 00:03:22 +0200
committerConrad Kostecki <conikost@gentoo.org>2020-08-25 00:32:59 +0200
commitf66e7565d64dc115843848fe50322778c2db2ec8 (patch)
tree744a3c91d90a39c913955c342b2b26dec250135b /x11-misc
parentnet-im/transwhat: add python3.9 support (diff)
downloadgentoo-f66e7565d64dc115843848fe50322778c2db2ec8.tar.gz
gentoo-f66e7565d64dc115843848fe50322778c2db2ec8.tar.bz2
gentoo-f66e7565d64dc115843848fe50322778c2db2ec8.zip
x11-misc/mugshot: add python3.9 support
Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'x11-misc')
-rw-r--r--x11-misc/mugshot/files/mugshot-0.4.2-python39.patch36
-rw-r--r--x11-misc/mugshot/mugshot-0.4.2-r1.ebuild4
2 files changed, 39 insertions, 1 deletions
diff --git a/x11-misc/mugshot/files/mugshot-0.4.2-python39.patch b/x11-misc/mugshot/files/mugshot-0.4.2-python39.patch
new file mode 100644
index 000000000000..b0443f7a3d33
--- /dev/null
+++ b/x11-misc/mugshot/files/mugshot-0.4.2-python39.patch
@@ -0,0 +1,36 @@
+From 643b3d005a8865c961b836aeae4c1f76711646e9 Mon Sep 17 00:00:00 2001
+From: Conrad Kostecki <conrad@kostecki.com>
+Date: Mon, 24 Aug 2020 23:58:10 +0200
+Subject: [PATCH] Add python3.9 compatiblity
+
+Starting with python3.9, launching of mugshot will fail,
+as getiterator() been deprecated since Python 2.7,
+and has been removed in Python 3.9. Using iter() will fix that.
+
+Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
+---
+ mugshot_lib/Builder.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mugshot_lib/Builder.py b/mugshot_lib/Builder.py
+index 7297541..6c08d70 100644
+--- a/mugshot_lib/Builder.py
++++ b/mugshot_lib/Builder.py
+@@ -89,7 +89,7 @@ def add_from_file(self, filename):
+ tree = ElementTree()
+ tree.parse(filename)
+
+- ele_widgets = tree.getiterator("object")
++ ele_widgets = tree.iter("object")
+ for ele_widget in ele_widgets:
+ name = ele_widget.attrib['id']
+ widget = self.get_object(name)
+@@ -111,7 +111,7 @@ def add_from_file(self, filename):
+ if connections:
+ self.connections.extend(connections)
+
+- ele_signals = tree.getiterator("signal")
++ ele_signals = tree.iter("signal")
+ for ele_signal in ele_signals:
+ self.glade_handler_dict.update(
+ {ele_signal.attrib["handler"]: None})
diff --git a/x11-misc/mugshot/mugshot-0.4.2-r1.ebuild b/x11-misc/mugshot/mugshot-0.4.2-r1.ebuild
index c547ba1e9538..a39fccdd02af 100644
--- a/x11-misc/mugshot/mugshot-0.4.2-r1.ebuild
+++ b/x11-misc/mugshot/mugshot-0.4.2-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=7
DISTUTILS_USE_SETUPTOOLS="no"
-PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_COMPAT=( python3_{6..9} )
inherit distutils-r1 gnome2-utils xdg-utils
@@ -59,6 +59,8 @@ BDEPEND="
S="${WORKDIR}/${PN}-${P}"
+PATCHES=( "${FILESDIR}/${PN}-0.4.2-python39.patch" )
+
python_install() {
distutils-r1_python_install