1 |
commit: 9c9be7aed5a49a06c58e938d9d1addd41303debe |
2 |
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 28 11:47:43 2022 +0000 |
4 |
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 28 11:50:42 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c9be7ae |
7 |
|
8 |
dev-python/mygpoclient: enable py3.10, ebuild cleanup |
9 |
|
10 |
Closes: https://bugs.gentoo.org/745948 |
11 |
Closes: https://bugs.gentoo.org/723736 |
12 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> |
13 |
|
14 |
.../files/mygpoclient-1.8-fix-literal.patch | 35 +++++++++++++++++++++ |
15 |
dev-python/mygpoclient/mygpoclient-1.8.ebuild | 36 ++++++++-------------- |
16 |
2 files changed, 48 insertions(+), 23 deletions(-) |
17 |
|
18 |
diff --git a/dev-python/mygpoclient/files/mygpoclient-1.8-fix-literal.patch b/dev-python/mygpoclient/files/mygpoclient-1.8-fix-literal.patch |
19 |
new file mode 100644 |
20 |
index 000000000000..372d0bc2bc40 |
21 |
--- /dev/null |
22 |
+++ b/dev-python/mygpoclient/files/mygpoclient-1.8-fix-literal.patch |
23 |
@@ -0,0 +1,35 @@ |
24 |
+From bdf8c8ce38cff8938bab3544c6dbb0d509ce7720 Mon Sep 17 00:00:00 2001 |
25 |
+From: Eric Le Lay <elelay@××××××××.org> |
26 |
+Date: Sun, 22 Mar 2020 16:19:08 +0100 |
27 |
+Subject: [PATCH] use == for comparison with literal |
28 |
+ |
29 |
+See https://bugs.python.org/issue34850 |
30 |
+--- |
31 |
+ mygpoclient/locator.py | 6 +++--- |
32 |
+ 1 file changed, 3 insertions(+), 3 deletions(-) |
33 |
+ |
34 |
+diff --git a/mygpoclient/locator.py b/mygpoclient/locator.py |
35 |
+index c0dc9d7..810f973 100644 |
36 |
+--- a/mygpoclient/locator.py |
37 |
++++ b/mygpoclient/locator.py |
38 |
+@@ -317,17 +317,17 @@ def settings_uri(self, type, scope_param1, scope_param2): |
39 |
+ |
40 |
+ filename = self._username + '/%(type)s.json' % locals() |
41 |
+ |
42 |
+- if type is 'device': |
43 |
++ if type == 'device': |
44 |
+ if scope_param1 is None: |
45 |
+ raise ValueError('Devicename not specified') |
46 |
+ filename += '?device=%(scope_param1)s' % locals() |
47 |
+ |
48 |
+- if type is 'podcast': |
49 |
++ if type == 'podcast': |
50 |
+ if scope_param1 is None: |
51 |
+ raise ValueError('Podcast URL not specified') |
52 |
+ filename += '?podcast=%s' % quote(scope_param1) |
53 |
+ |
54 |
+- if type is 'episode': |
55 |
++ if type == 'episode': |
56 |
+ if (scope_param1 is None) or (scope_param2 is None): |
57 |
+ raise ValueError('Podcast or Episode URL not specified') |
58 |
+ filename += '?podcast=%s&episode=%s' % (quote(scope_param1), quote(scope_param2)) |
59 |
|
60 |
diff --git a/dev-python/mygpoclient/mygpoclient-1.8.ebuild b/dev-python/mygpoclient/mygpoclient-1.8.ebuild |
61 |
index 9c66b03f5c3a..7992f3b024a2 100644 |
62 |
--- a/dev-python/mygpoclient/mygpoclient-1.8.ebuild |
63 |
+++ b/dev-python/mygpoclient/mygpoclient-1.8.ebuild |
64 |
@@ -1,9 +1,9 @@ |
65 |
-# Copyright 1999-2021 Gentoo Authors |
66 |
+# Copyright 1999-2022 Gentoo Authors |
67 |
# Distributed under the terms of the GNU General Public License v2 |
68 |
|
69 |
-EAPI=7 |
70 |
-PYTHON_COMPAT=( python3_{7,8,9} ) |
71 |
+EAPI=8 |
72 |
|
73 |
+PYTHON_COMPAT=( python3_{8..10} ) |
74 |
inherit distutils-r1 |
75 |
|
76 |
DESCRIPTION="A gpodder.net client library" |
77 |
@@ -14,34 +14,24 @@ SRC_URI="https://github.com/gpodder/mygpoclient/archive/${PV}.tar.gz -> ${P}.tar |
78 |
LICENSE="GPL-3" |
79 |
SLOT="0" |
80 |
KEYWORDS="amd64 x86" |
81 |
-IUSE="test" |
82 |
-RESTRICT="!test? ( test )" |
83 |
|
84 |
-RDEPEND="dev-python/simplejson[${PYTHON_USEDEP}]" |
85 |
-DEPEND="${RDEPEND} |
86 |
- test? ( |
87 |
- dev-python/coverage[${PYTHON_USEDEP}] |
88 |
- dev-python/minimock |
89 |
- ) |
90 |
-" |
91 |
+BDEPEND="test? ( dev-python/minimock[${PYTHON_USEDEP}] )" |
92 |
|
93 |
-PATCHES=( "${FILESDIR}"/${P}-tests.patch ) |
94 |
+PATCHES=( |
95 |
+ "${FILESDIR}"/${P}-fix-literal.patch |
96 |
+ "${FILESDIR}"/${PN}-1.8-tests.patch |
97 |
+) |
98 |
+ |
99 |
+distutils_enable_tests nose |
100 |
|
101 |
src_prepare() { |
102 |
- distutils-r1_src_prepare |
103 |
# Disable tests requring network connection. |
104 |
- rm -f mygpoclient/http_test.py |
105 |
-} |
106 |
+ rm mygpoclient/http_test.py || die |
107 |
|
108 |
-python_test() { |
109 |
- if [[ "${EPYTHON:0:4}" == "pypy" ]]; then |
110 |
- nosetests --cover-erase --with-coverage --cover-package=mygpoclient "${BUILD_DIR}"/lib/${PN}/ |
111 |
- else |
112 |
- nosetests --cover-erase --with-coverage --with-doctest --cover-package=mygpoclient "${BUILD_DIR}"/lib/${PN}/ |
113 |
- fi |
114 |
+ distutils-r1_src_prepare |
115 |
} |
116 |
|
117 |
src_install() { |
118 |
distutils-r1_src_install |
119 |
- rm -f $(find "${D}" -name "*_test.py") |
120 |
+ find "${D}" -name "*_test.py" -delete || die |
121 |
} |