summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2021-08-20 10:40:22 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2021-08-20 10:43:27 +0300
commit67554cc3b5fc0871a642283d701fe3c1a0b66f6d (patch)
tree74873877a3c035678d42228755ba83b2bf7d12be /dev-python/python-varlink
parentdev-python/future: mark ALLARCHES (diff)
downloadgentoo-67554cc3b5fc0871a642283d701fe3c1a0b66f6d.tar.gz
gentoo-67554cc3b5fc0871a642283d701fe3c1a0b66f6d.tar.bz2
gentoo-67554cc3b5fc0871a642283d701fe3c1a0b66f6d.zip
dev-python/python-varlink: add 30.3.1, EAPI=8, enable py3.{9,10}
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-python/python-varlink')
-rw-r--r--dev-python/python-varlink/Manifest1
-rw-r--r--dev-python/python-varlink/files/python-varlink-30.3.1-fix.py3.10.patch30
-rw-r--r--dev-python/python-varlink/python-varlink-30.3.1.ebuild34
3 files changed, 65 insertions, 0 deletions
diff --git a/dev-python/python-varlink/Manifest b/dev-python/python-varlink/Manifest
index dc585c6ac0e2..1623ce2efe13 100644
--- a/dev-python/python-varlink/Manifest
+++ b/dev-python/python-varlink/Manifest
@@ -1 +1,2 @@
DIST python-varlink-30.3.0.tar.gz 40124 BLAKE2B a93fe2fad156dfd8f74841846dbe9da127d01e837ad0ae750658b0391da006c913eef663e4777ad2fc6c9c2d19746e52d7e66c49cdd43f0417db9d558d4b5dee SHA512 1aac105d62452144525d8b4c59dbd7a70a9cf82589cce0b98ac56e457d985d2c370f8ce99d209294b4a4cfe1683ae2bc1a280ea5a8878ecd4bcf2951ff0b802d
+DIST python-varlink-30.3.1.gh.tar.gz 39921 BLAKE2B d717eb662cd14fffd7620fb8f3eee5ae8431b77a437a783ba090802a26d0225439eb9305050863c85a6c33dbdd28709262858bf407a08333b177057304695c93 SHA512 13a0176694ee31121998a2dd88bf57d840ec20b0ccac63b574c4f12ef5c9bfbfbd67bdc7a8d362cd1c256e393d8c3691d1efc58aabaf8f5ec26067a55157a6cd
diff --git a/dev-python/python-varlink/files/python-varlink-30.3.1-fix.py3.10.patch b/dev-python/python-varlink/files/python-varlink-30.3.1-fix.py3.10.patch
new file mode 100644
index 000000000000..e85826f6bc0e
--- /dev/null
+++ b/dev-python/python-varlink/files/python-varlink-30.3.1-fix.py3.10.patch
@@ -0,0 +1,30 @@
+From 0a9014ad564131ee98dc8c4c1f9cc0c5e29d5dac Mon Sep 17 00:00:00 2001
+From: Arthur Zamarin <arthurzam@gentoo.org>
+Date: Fri, 20 Aug 2021 10:37:42 +0300
+Subject: [PATCH] Python3.10: fix import collections
+
+Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
+---
+ varlink/scanner.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/varlink/scanner.py b/varlink/scanner.py
+index d5a0e7b..58ced74 100644
+--- a/varlink/scanner.py
++++ b/varlink/scanner.py
+@@ -21,7 +21,11 @@ try:
+ except: # Python 2
+ from argparse import Namespace as SimpleNamespace
+
+-from collections import (Set, OrderedDict, Mapping)
++try:
++ from collections.abc import (Set, Mapping)
++ from collections import OrderedDict
++except ImportError:
++ from collections import (Set, OrderedDict, Mapping)
+
+ from .error import (MethodNotFound, InvalidParameter)
+
+--
+2.33.0
+
diff --git a/dev-python/python-varlink/python-varlink-30.3.1.ebuild b/dev-python/python-varlink/python-varlink-30.3.1.ebuild
new file mode 100644
index 000000000000..9a04cf6dc26a
--- /dev/null
+++ b/dev-python/python-varlink/python-varlink-30.3.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit distutils-r1
+
+DESCRIPTION="Python implementation of the Varlink protocol"
+HOMEPAGE="https://github.com/varlink/python"
+SRC_URI="
+ https://github.com/varlink/python/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+S="${WORKDIR}/python-${PV}"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="dev-python/future[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix.py3.10.patch"
+)
+
+distutils_enable_tests unittest
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+
+ sed -e '/setuptools_scm/d' -i setup.cfg || die
+ sed -e "s/use_scm_version=True/version='${PV}'/" -i setup.py || die
+}