1 |
commit: f814ef2c9cbd119c27a2cf3889c84612bc7765d2 |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Sep 26 17:25:49 2021 +0000 |
4 |
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
5 |
CommitDate: Sun Sep 26 18:37:08 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f814ef2c |
7 |
|
8 |
dev-python/daiquiri: initial import |
9 |
|
10 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
11 |
|
12 |
dev-python/daiquiri/Manifest | 1 + |
13 |
dev-python/daiquiri/daiquiri-3.0.1.ebuild | 29 ++++++++++ |
14 |
.../testrepository-0.0.20-test-backport.patch | 62 ++++++++++++++++++++++ |
15 |
.../testrepository-0.0.20-test-backport1.patch | 16 ++++++ |
16 |
.../testrepository-0.0.20-test-backport2.patch | 49 +++++++++++++++++ |
17 |
dev-python/daiquiri/metadata.xml | 15 ++++++ |
18 |
6 files changed, 172 insertions(+) |
19 |
|
20 |
diff --git a/dev-python/daiquiri/Manifest b/dev-python/daiquiri/Manifest |
21 |
new file mode 100644 |
22 |
index 000000000..6a12a3d94 |
23 |
--- /dev/null |
24 |
+++ b/dev-python/daiquiri/Manifest |
25 |
@@ -0,0 +1 @@ |
26 |
+DIST daiquiri-3.0.1.tar.gz 17948 BLAKE2B 1865d1e6b7ad0a1c9b8390992255726a3383034fd631cd217cb2ac820106efaeced3e44168f14d4b8c851e0c17a5d980aeb28a3d3ea3399701af2ea1c248b9c0 SHA512 4c786a744a8ed89147bb77c8825d8733ca88bf1d1877058c87257c92a7ae3b343a0820e9d83f4ac8a2a1b9b74d33f72bb5b306703b3bd57b51cf7931041c5d6c |
27 |
|
28 |
diff --git a/dev-python/daiquiri/daiquiri-3.0.1.ebuild b/dev-python/daiquiri/daiquiri-3.0.1.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000..f2e683390 |
31 |
--- /dev/null |
32 |
+++ b/dev-python/daiquiri/daiquiri-3.0.1.ebuild |
33 |
@@ -0,0 +1,29 @@ |
34 |
+# Copyright 1999-2021 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=8 |
38 |
+ |
39 |
+PYTHON_COMPAT=( python3_8 ) |
40 |
+ |
41 |
+inherit distutils-r1 |
42 |
+ |
43 |
+DESCRIPTION="Python library to easily setup basic logging functionality" |
44 |
+HOMEPAGE=" |
45 |
+ https://pypi.org/project/daiquiri |
46 |
+ https://github.com/jd/daiquiri |
47 |
+" |
48 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
49 |
+ |
50 |
+LICENSE="Apache-2.0" |
51 |
+SLOT="0" |
52 |
+KEYWORDS="~amd64" |
53 |
+ |
54 |
+RDEPEND=" |
55 |
+ dev-python/python-json-logger[${PYTHON_USEDEP}] |
56 |
+" |
57 |
+DEPEND=" |
58 |
+ ${RDEPEND} |
59 |
+ dev-python/setuptools_scm[${PYTHON_USEDEP}] |
60 |
+" |
61 |
+ |
62 |
+distutils_enable_tests pytest |
63 |
|
64 |
diff --git a/dev-python/daiquiri/files/testrepository-0.0.20-test-backport.patch b/dev-python/daiquiri/files/testrepository-0.0.20-test-backport.patch |
65 |
new file mode 100644 |
66 |
index 000000000..d7ab87c06 |
67 |
--- /dev/null |
68 |
+++ b/dev-python/daiquiri/files/testrepository-0.0.20-test-backport.patch |
69 |
@@ -0,0 +1,62 @@ |
70 |
+From 8f8ab15fafdad6db850c84772323b32375b09285 Mon Sep 17 00:00:00 2001 |
71 |
+From: Robert Collins <robertc@×××××××××××××.net> |
72 |
+Date: Tue, 10 Mar 2015 15:21:49 +1300 |
73 |
+Subject: [PATCH] Fixup tests with latest testtools. |
74 |
+ |
75 |
+Testtools has started chunking exceptions (which is perhaps good, |
76 |
+perhaps bad) - but we shouldn't depend on the exact behaviour in it |
77 |
+for our tests. |
78 |
+--- a/NEWS |
79 |
++++ b/NEWS |
80 |
+@@ -5,6 +5,12 @@ testrepository release notes |
81 |
+ NEXT (In development) |
82 |
+ +++++++++++++++++++++ |
83 |
+ |
84 |
++CHANGES |
85 |
++------- |
86 |
++ |
87 |
++* Isolate the testrepository test suite from the chunking (or otherwise) |
88 |
++ behaviour of testtools' exception handlers. (Robert Collins) |
89 |
++ |
90 |
+ 0.0.20 |
91 |
+ ++++++ |
92 |
+ |
93 |
+--- a/testrepository/tests/test_repository.py |
94 |
++++ b/testrepository/tests/test_repository.py |
95 |
+@@ -28,6 +28,7 @@ |
96 |
+ from testresources import TestResource |
97 |
+ from testtools import ( |
98 |
+ clone_test_with_new_id, |
99 |
++ content, |
100 |
+ PlaceHolder, |
101 |
+ ) |
102 |
+ import testtools |
103 |
+@@ -103,19 +104,24 @@ class Case(ResourcedTestCase): |
104 |
+ def passing(self): |
105 |
+ pass |
106 |
+ |
107 |
+- def failing(self): |
108 |
+- self.fail("oops") |
109 |
+- |
110 |
+ def unexpected_success(self): |
111 |
+ self.expectFailure("unexpected success", self.assertTrue, True) |
112 |
+ |
113 |
+ |
114 |
++class FailingCase: |
115 |
++ |
116 |
++ def run(self, result): |
117 |
++ result.startTest(self) |
118 |
++ result.addError( |
119 |
++ self, None, details={'traceback': content.text_content("")}) |
120 |
++ result.stopTest(self) |
121 |
++ |
122 |
+ def make_test(id, should_pass): |
123 |
+ """Make a test.""" |
124 |
+ if should_pass: |
125 |
+ case = Case("passing") |
126 |
+ else: |
127 |
+- case = Case("failing") |
128 |
++ case = FailingCase() |
129 |
+ return clone_test_with_new_id(case, id) |
130 |
+ |
131 |
+ |
132 |
|
133 |
diff --git a/dev-python/daiquiri/files/testrepository-0.0.20-test-backport1.patch b/dev-python/daiquiri/files/testrepository-0.0.20-test-backport1.patch |
134 |
new file mode 100644 |
135 |
index 000000000..655d2c3e7 |
136 |
--- /dev/null |
137 |
+++ b/dev-python/daiquiri/files/testrepository-0.0.20-test-backport1.patch |
138 |
@@ -0,0 +1,16 @@ |
139 |
+From d3d6cac4fd42f2067c0dd81be748853f81c348fc Mon Sep 17 00:00:00 2001 |
140 |
+From: Robert Collins <robertc@×××××××××××××.net> |
141 |
+Date: Sun, 12 Jul 2015 21:37:34 +1200 |
142 |
+Subject: [PATCH] Fix 3.3+ tests with nested classnames. |
143 |
+ |
144 |
+--- a/testrepository/tests/ui/test_cli.py |
145 |
++++ b/testrepository/tests/ui/test_cli.py |
146 |
+@@ -157,7 +157,7 @@ def method(self): |
147 |
+ self.assertThat(ui._stdout.buffer.getvalue().decode('utf8'), |
148 |
+ DocTestMatches("""\ |
149 |
+ ====================================================================== |
150 |
+-FAIL: testrepository.tests.ui.test_cli.Case.method |
151 |
++FAIL: testrepository.tests.ui.test_cli...Case.method |
152 |
+ ---------------------------------------------------------------------- |
153 |
+ ...Traceback (most recent call last):... |
154 |
+ File "...test_cli.py", line ..., in method |
155 |
|
156 |
diff --git a/dev-python/daiquiri/files/testrepository-0.0.20-test-backport2.patch b/dev-python/daiquiri/files/testrepository-0.0.20-test-backport2.patch |
157 |
new file mode 100644 |
158 |
index 000000000..69d591c2f |
159 |
--- /dev/null |
160 |
+++ b/dev-python/daiquiri/files/testrepository-0.0.20-test-backport2.patch |
161 |
@@ -0,0 +1,49 @@ |
162 |
+From e2f84ae6b2bcf89221613056d0c45dd308f46d62 Mon Sep 17 00:00:00 2001 |
163 |
+From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= <jelmer@××××××.uk> |
164 |
+Date: Thu, 5 Apr 2018 01:02:40 +0100 |
165 |
+Subject: [PATCH] Fix the testrepository tests with newer versions of |
166 |
+ testtools. |
167 |
+ |
168 |
+--- a/testrepository/tests/commands/test_failing.py |
169 |
++++ b/testrepository/tests/commands/test_failing.py |
170 |
+@@ -90,7 +90,7 @@ class TestCommand(ResourcedTestCase): |
171 |
+ finally: |
172 |
+ log.stopTestRun() |
173 |
+ self.assertEqual( |
174 |
+- log._events, [ |
175 |
++ [tuple(ev) for ev in log._events], [ |
176 |
+ ('startTestRun',), |
177 |
+ ('status', 'failing', 'inprogress', None, True, None, None, False, |
178 |
+ None, None, Wildcard), |
179 |
+--- a/testrepository/tests/test_repository.py |
180 |
++++ b/testrepository/tests/test_repository.py |
181 |
+@@ -113,9 +113,10 @@ class FailingCase: |
182 |
+ def run(self, result): |
183 |
+ result.startTest(self) |
184 |
+ result.addError( |
185 |
+- self, None, details={'traceback': content.text_content("")}) |
186 |
++ self, None, details={'traceback': content.text_content("tb")}) |
187 |
+ result.stopTest(self) |
188 |
+ |
189 |
++ |
190 |
+ def make_test(id, should_pass): |
191 |
+ """Make a test.""" |
192 |
+ if should_pass: |
193 |
+@@ -409,7 +410,7 @@ class TestRepositoryContract(ResourcedTestCase): |
194 |
+ finally: |
195 |
+ log.stopTestRun() |
196 |
+ self.assertEqual( |
197 |
+- log._events, [ |
198 |
++ [tuple(ev) for ev in log._events], [ |
199 |
+ ('startTestRun',), |
200 |
+ ('status', |
201 |
+ 'testrepository.tests.test_repository.Case.method', |
202 |
+@@ -465,7 +466,7 @@ class TestRepositoryContract(ResourcedTestCase): |
203 |
+ finally: |
204 |
+ log.stopTestRun() |
205 |
+ self.assertEqual( |
206 |
+- log._events, |
207 |
++ [tuple(ev) for ev in log._events], |
208 |
+ [ |
209 |
+ ('startTestRun',), |
210 |
+ ('status', |
211 |
|
212 |
diff --git a/dev-python/daiquiri/metadata.xml b/dev-python/daiquiri/metadata.xml |
213 |
new file mode 100644 |
214 |
index 000000000..e0e18bf58 |
215 |
--- /dev/null |
216 |
+++ b/dev-python/daiquiri/metadata.xml |
217 |
@@ -0,0 +1,15 @@ |
218 |
+<?xml version="1.0" encoding="UTF-8"?> |
219 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
220 |
+<pkgmetadata> |
221 |
+ <maintainer type="person"> |
222 |
+ <email>lssndrbarbieri@×××××.com</email> |
223 |
+ <name>Alessandro Barbieri</name> |
224 |
+ </maintainer> |
225 |
+ <longdescription lang="en"> |
226 |
+The daiquiri library provides an easy way to configure logging. It also provides some custom formatters and handlers. |
227 |
+ </longdescription> |
228 |
+ <upstream> |
229 |
+ <remote-id type="github">jd/daiquiri</remote-id> |
230 |
+ <remote-id type="pypi">daiquiri</remote-id> |
231 |
+ </upstream> |
232 |
+</pkgmetadata> |