commit:     95281634bbc18e206f8db438d13e42af8ae00a1d
Author:     Arthur Zamarin <arthurzam <AT> gmail <DOT> com>
AuthorDate: Fri Jul 30 16:43:47 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Aug  2 08:16:44 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95281634

dev-python/leather: bump EAPI=8, add python 3.10

Signed-off-by: Arthur Zamarin <arthurzam <AT> gmail.com>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../leather/files/leather-0.3.3-fix-py3.10.patch   | 40 ++++++++++++++++++++++
 dev-python/leather/leather-0.3.3-r2.ebuild         | 18 ++++++----
 2 files changed, 51 insertions(+), 7 deletions(-)

diff --git a/dev-python/leather/files/leather-0.3.3-fix-py3.10.patch 
b/dev-python/leather/files/leather-0.3.3-fix-py3.10.patch
new file mode 100644
index 00000000000..8ec9e1767a4
--- /dev/null
+++ b/dev-python/leather/files/leather-0.3.3-fix-py3.10.patch
@@ -0,0 +1,40 @@
+From 5dd1d3cc82d426388c66db8e3761ca2bf99a3991 Mon Sep 17 00:00:00 2001
+From: Brian <[email protected]>
+Date: Fri, 27 Mar 2020 17:08:50 -0400
+Subject: [PATCH] import from collections.abc to suppress python 3.7 warning
+
+---
+ leather/series/base.py     | 5 ++++-
+ leather/series/category.py | 5 ++++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/leather/series/base.py b/leather/series/base.py
+index c5790e5..959e827 100644
+--- a/leather/series/base.py
++++ b/leather/series/base.py
+@@ -1,6 +1,9 @@
+ #!/usr/bin/env python
+ 
+-from collections import Iterable, Sequence, Mapping
++try:
++    from collections.abc import Iterable, Sequence, Mapping
++except ImportError:
++    from collections import Iterable, Sequence, Mapping
+ from functools import partial
+ 
+ import six
+diff --git a/leather/series/category.py b/leather/series/category.py
+index c575308..3678377 100644
+--- a/leather/series/category.py
++++ b/leather/series/category.py
+@@ -1,6 +1,9 @@
+ #!/usr/bin/env python
+ 
+-from collections import Iterable, Sequence, Mapping
++try:
++    from collections.abc import Iterable, Sequence, Mapping
++except ImportError:
++    from collections import Iterable, Sequence, Mapping
+ from functools import partial
+ 
+ import six

diff --git a/dev-python/leather/leather-0.3.3-r2.ebuild 
b/dev-python/leather/leather-0.3.3-r2.ebuild
index c792bf43f78..1792a5e19c7 100644
--- a/dev-python/leather/leather-0.3.3-r2.ebuild
+++ b/dev-python/leather/leather-0.3.3-r2.ebuild
@@ -1,29 +1,33 @@
 # Copyright 2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
-PYTHON_COMPAT=( python3_{8..9} )
-DISTUTILS_USE_SETUPTOOLS=bdepend
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
 
 inherit distutils-r1
 
 DESCRIPTION="Python charting for 80% of humans."
 HOMEPAGE="https://github.com/wireservice/leather 
https://pypi.org/project/leather/";
 SRC_URI="https://github.com/wireservice/leather/archive/refs/tags/${PV}.tar.gz 
-> ${P}-src.tar.gz"
+
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE="test +xml"
-RESTRICT="!test? ( test )"
+IUSE="+xml"
 
 # Other packages have BDEPEND="test? ( dev-python/leather[xml] )"
 TEST_AGAINST_RDEPEND="xml? ( dev-python/lxml[${PYTHON_USEDEP}] )"
 RDEPEND="
        ${TEST_AGAINST_RDEPEND}
-       >=dev-python/cssselect-0.9.1[${PYTHON_USEDEP}]
-       >=dev-python/six-1.6.1[${PYTHON_USEDEP}]
+       dev-python/cssselect[${PYTHON_USEDEP}]
+       dev-python/six[${PYTHON_USEDEP}]
 "
 
+PATCHES=(
+       "${FILESDIR}/${P}-fix-py3.10.patch"
+)
+
 distutils_enable_tests pytest
 
 python_prepare_all() {

Reply via email to