1 |
commit: 26985cff13875b4bdc95bf98966b496992cc2680 |
2 |
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 16 18:29:45 2022 +0000 |
4 |
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 16 18:50:04 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26985cff |
7 |
|
8 |
dev-python/coverage: add 6.4.4 |
9 |
|
10 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> |
11 |
|
12 |
dev-python/coverage/Manifest | 1 + |
13 |
dev-python/coverage/coverage-6.4.4.ebuild | 68 +++++++++++++++++++++++++++++++ |
14 |
2 files changed, 69 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/coverage/Manifest b/dev-python/coverage/Manifest |
17 |
index 3b4bba1fa575..bc47c0d8d0ba 100644 |
18 |
--- a/dev-python/coverage/Manifest |
19 |
+++ b/dev-python/coverage/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST coverage-6.4.3.tar.gz 722764 BLAKE2B f4d45aa9f0494bfe43e244907bda14e4a99bce7d4cdc4f6610abed3a2600a6f836dccd6c4c795f6bf0f8eeab2ab3df4f0ddc3f9e2d1285d57415f9bc06b47635 SHA512 7ff93dfb58f9d00a9016c86cc4425932c6dfc700954e5174b6a39c23900915f3dc1c5951a60d4ccb2155d82e2c552c07894670440dc17574e0ef5e0ba7bb4a81 |
22 |
+DIST coverage-6.4.4.tar.gz 772949 BLAKE2B 87b4c51ac43ac3bd2202496f6db6de5c74dd9925521bf3092cd862b86d8d7c0e3d008ee550c90e890febd87cc4d167669e830668f15da94ef4ea72e82154bf26 SHA512 f210f2471b170e05d4dac2cc9a91e3f0d4ba6456cdf91dc1c0ef67a02a11f4279c5beca5df8854c42660346995492b1eff020e1ac578d2a0a129627dadd17114 |
23 |
|
24 |
diff --git a/dev-python/coverage/coverage-6.4.4.ebuild b/dev-python/coverage/coverage-6.4.4.ebuild |
25 |
new file mode 100644 |
26 |
index 000000000000..8a27c2c95f30 |
27 |
--- /dev/null |
28 |
+++ b/dev-python/coverage/coverage-6.4.4.ebuild |
29 |
@@ -0,0 +1,68 @@ |
30 |
+# Copyright 1999-2022 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=8 |
34 |
+ |
35 |
+DISTUTILS_USE_PEP517=setuptools |
36 |
+PYTHON_COMPAT=( python3_{8..11} pypy3 ) |
37 |
+PYTHON_REQ_USE="threads(+),sqlite(+)" |
38 |
+ |
39 |
+inherit distutils-r1 |
40 |
+ |
41 |
+DESCRIPTION="Code coverage measurement for Python" |
42 |
+HOMEPAGE=" |
43 |
+ https://coverage.readthedocs.io/en/latest/ |
44 |
+ https://github.com/nedbat/coveragepy/ |
45 |
+ https://pypi.org/project/coverage/ |
46 |
+" |
47 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
48 |
+ |
49 |
+LICENSE="BSD" |
50 |
+SLOT="0" |
51 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" |
52 |
+ |
53 |
+BDEPEND=" |
54 |
+ test? ( |
55 |
+ dev-python/flaky[${PYTHON_USEDEP}] |
56 |
+ dev-python/hypothesis[${PYTHON_USEDEP}] |
57 |
+ dev-python/pytest-xdist[${PYTHON_USEDEP}] |
58 |
+ >=dev-python/unittest-mixins-1.4[${PYTHON_USEDEP}] |
59 |
+ ) |
60 |
+" |
61 |
+ |
62 |
+distutils_enable_tests pytest |
63 |
+ |
64 |
+src_prepare() { |
65 |
+ sed -i -e '/^addopts/s:-q -n auto::' setup.cfg || die |
66 |
+ distutils-r1_src_prepare |
67 |
+} |
68 |
+ |
69 |
+test_tracer() { |
70 |
+ local -x COVERAGE_TEST_TRACER=${1} |
71 |
+ einfo " Testing with the ${COVERAGE_TEST_TRACER} tracer ..." |
72 |
+ epytest tests |
73 |
+} |
74 |
+ |
75 |
+python_test() { |
76 |
+ "${EPYTHON}" igor.py zip_mods || die |
77 |
+ |
78 |
+ local -x COVERAGE_TESTING=True |
79 |
+ # TODO: figure out why they can't be imported inside test env |
80 |
+ local -x COVERAGE_NO_CONTRACTS=1 |
81 |
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 |
82 |
+ local -x PYTEST_PLUGINS=_hypothesis_pytestplugin,flaky.flaky_pytest_plugin,xdist.plugin |
83 |
+ |
84 |
+ local prev_opt=$(shopt -p nullglob) |
85 |
+ shopt -s nullglob |
86 |
+ local c_ext=( "${BUILD_DIR}/install$(python_get_sitedir)"/coverage/*.so ) |
87 |
+ ${prev_opt} |
88 |
+ |
89 |
+ if [[ -n ${c_ext} ]]; then |
90 |
+ cp "${c_ext}" \ |
91 |
+ coverage/ || die |
92 |
+ test_tracer c |
93 |
+ rm coverage/*.so || die |
94 |
+ else |
95 |
+ test_tracer py |
96 |
+ fi |
97 |
+} |