1 |
commit: 16dae49cee3ea8253f25830b3e0c1c74e68df4c0 |
2 |
Author: Matt Jolly <Matt.Jolly <AT> footclan <DOT> ninja> |
3 |
AuthorDate: Thu Aug 25 08:09:43 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 26 07:18:49 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16dae49c |
7 |
|
8 |
dev-python/pytest-twisted: new package, add 1.13.4 |
9 |
|
10 |
Signed-off-by: Matt Jolly <Matt.Jolly <AT> footclan.ninja> |
11 |
Closes: https://github.com/gentoo/gentoo/pull/26903 |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
dev-python/pytest-twisted/Manifest | 1 + |
15 |
dev-python/pytest-twisted/metadata.xml | 15 +++++++ |
16 |
.../pytest-twisted/pytest-twisted-1.13.4.ebuild | 47 ++++++++++++++++++++++ |
17 |
3 files changed, 63 insertions(+) |
18 |
|
19 |
diff --git a/dev-python/pytest-twisted/Manifest b/dev-python/pytest-twisted/Manifest |
20 |
new file mode 100644 |
21 |
index 000000000000..dc6c53d82ef4 |
22 |
--- /dev/null |
23 |
+++ b/dev-python/pytest-twisted/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST pytest-twisted-1.13.4.tar.gz 15687 BLAKE2B 8e1024da02a5a1c9c33df96c18a355b9be5757446d9f5495ba1f043c15a2e44efd6e59693986a0684d77b8518393ce9f382d62e3d1e5b903876e8cff34efb427 SHA512 99899ad73f87582023a0e639986a287b4571638be4f1ae134078a15a4d4bebd24153f813c993382603edc14306c12931e2daf517d7998e48d3d19b8469c0b7aa |
26 |
|
27 |
diff --git a/dev-python/pytest-twisted/metadata.xml b/dev-python/pytest-twisted/metadata.xml |
28 |
new file mode 100644 |
29 |
index 000000000000..2d0071fe9c21 |
30 |
--- /dev/null |
31 |
+++ b/dev-python/pytest-twisted/metadata.xml |
32 |
@@ -0,0 +1,15 @@ |
33 |
+<?xml version="1.0" encoding="UTF-8"?> |
34 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
35 |
+<pkgmetadata> |
36 |
+ <upstream> |
37 |
+ <remote-id type="github">pytest-dev/pytest-twisted</remote-id> |
38 |
+ </upstream> |
39 |
+ <maintainer type="person"> |
40 |
+ <email>Matt.Jolly@××××××××.ninja</email> |
41 |
+ <name>Matt Jolly</name> |
42 |
+ </maintainer> |
43 |
+ <maintainer type="project" proxied="proxy"> |
44 |
+ <email>proxy-maint@g.o</email> |
45 |
+ <name>Gentoo Proxy Maintainers Project</name> |
46 |
+ </maintainer> |
47 |
+</pkgmetadata> |
48 |
|
49 |
diff --git a/dev-python/pytest-twisted/pytest-twisted-1.13.4.ebuild b/dev-python/pytest-twisted/pytest-twisted-1.13.4.ebuild |
50 |
new file mode 100644 |
51 |
index 000000000000..7f0af08f78f5 |
52 |
--- /dev/null |
53 |
+++ b/dev-python/pytest-twisted/pytest-twisted-1.13.4.ebuild |
54 |
@@ -0,0 +1,47 @@ |
55 |
+# Copyright 1999-2022 Gentoo Authors |
56 |
+# Distributed under the terms of the GNU General Public License v2 |
57 |
+ |
58 |
+EAPI=8 |
59 |
+ |
60 |
+PYTHON_COMPAT=( python3_{8..11} ) |
61 |
+ |
62 |
+DISTUTILS_USE_PEP517=setuptools |
63 |
+inherit distutils-r1 |
64 |
+ |
65 |
+DESCRIPTION="pytest-twisted is a plugin for pytest that allows you to test code which uses the twisted framework" |
66 |
+HOMEPAGE="https://github.com/pytest-dev/pytest-twisted" |
67 |
+SRC_URI="https://github.com/pytest-dev/pytest-twisted/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
68 |
+ |
69 |
+LICENSE="BSD" |
70 |
+SLOT="0" |
71 |
+KEYWORDS="~amd64" |
72 |
+ |
73 |
+RDEPEND=" |
74 |
+ dev-python/decorator[${PYTHON_USEDEP}] |
75 |
+ dev-python/greenlet[${PYTHON_USEDEP}] |
76 |
+ >=dev-python/pytest-2.3[${PYTHON_USEDEP}] |
77 |
+ dev-python/twisted[${PYTHON_USEDEP}] |
78 |
+" |
79 |
+ |
80 |
+distutils_enable_tests pytest |
81 |
+ |
82 |
+src_prepare() { |
83 |
+ # https://github.com/pytest-dev/pytest/issues/9280 |
84 |
+ sed -e '/^pytest_plugins =/d' -i testing/conftest.py || die |
85 |
+ |
86 |
+ distutils-r1_src_prepare |
87 |
+} |
88 |
+ |
89 |
+python_test() { |
90 |
+ epytest -p pytester |
91 |
+} |
92 |
+ |
93 |
+src_install() { |
94 |
+ # If we let pytest-twisted autoload everywhere, it breaks tests in |
95 |
+ # packages that don't expect it. Apply a similar hack as for bug |
96 |
+ # #661218. We can't do this in src_prepare() because the tests need |
97 |
+ # autoloading enabled. |
98 |
+ sed -e 's/"pytest11": \[[^]]*\]//' -i setup.py || die |
99 |
+ |
100 |
+ distutils-r1_src_install |
101 |
+} |