1 |
commit: 2833368b7dc517c1ad4b518389c99be96ca3457b |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 7 08:53:15 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 7 09:12:51 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2833368b |
7 |
|
8 |
dev-python/pytest-trio: EAPI 8, PEP517 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pytest-trio/pytest-trio-0.7.0-r1.ebuild | 52 ++++++++++++++++++++++ |
13 |
1 file changed, 52 insertions(+) |
14 |
|
15 |
diff --git a/dev-python/pytest-trio/pytest-trio-0.7.0-r1.ebuild b/dev-python/pytest-trio/pytest-trio-0.7.0-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 000000000000..ac9b1f5bd507 |
18 |
--- /dev/null |
19 |
+++ b/dev-python/pytest-trio/pytest-trio-0.7.0-r1.ebuild |
20 |
@@ -0,0 +1,52 @@ |
21 |
+# Copyright 1999-2022 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=8 |
25 |
+ |
26 |
+DISTUTILS_USE_PEP517=setuptools |
27 |
+PYTHON_COMPAT=( pypy3 python3_{8..10} ) |
28 |
+ |
29 |
+inherit distutils-r1 |
30 |
+ |
31 |
+DESCRIPTION="This is a pytest plugin to help you test projects that use Trio" |
32 |
+HOMEPAGE=" |
33 |
+ https://github.com/python-trio/pytest-trio |
34 |
+ https://pypi.org/project/pytest-trio/ |
35 |
+" |
36 |
+SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" |
37 |
+ |
38 |
+LICENSE="|| ( MIT Apache-2.0 )" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" |
41 |
+ |
42 |
+RDEPEND=" |
43 |
+ >=dev-python/async_generator-1.9[${PYTHON_USEDEP}] |
44 |
+ dev-python/outcome[${PYTHON_USEDEP}] |
45 |
+ >=dev-python/pytest-6.0.0[${PYTHON_USEDEP}] |
46 |
+ >=dev-python/trio-0.15[${PYTHON_USEDEP}] |
47 |
+" |
48 |
+BDEPEND=" |
49 |
+ test? ( |
50 |
+ >=dev-python/hypothesis-3.64[${PYTHON_USEDEP}] |
51 |
+ ) |
52 |
+" |
53 |
+ |
54 |
+distutils_enable_tests pytest |
55 |
+distutils_enable_sphinx docs/source \ |
56 |
+ dev-python/attrs \ |
57 |
+ dev-python/sphinx_rtd_theme \ |
58 |
+ dev-python/sphinxcontrib-trio |
59 |
+ |
60 |
+python_prepare_all() { |
61 |
+ # Defining 'pytest_plugins' in a non-top-level conftest is no longer supported: |
62 |
+ mv pytest_trio/_tests/conftest.py conftest.py || die |
63 |
+ distutils-r1_python_prepare_all |
64 |
+} |
65 |
+ |
66 |
+python_test() { |
67 |
+ # disable autoloading pytest-asyncio in nested pytest calls |
68 |
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 |
69 |
+ # since we disabled autoloading, force loading pytest-trio |
70 |
+ local -x PYTEST_PLUGINS=pytest_trio.plugin |
71 |
+ epytest |
72 |
+} |