1 |
commit: fd82cbb6fecb1e1059dfaa6a184f642939f8ecbf |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 13 05:06:27 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 13 06:15:18 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd82cbb6 |
7 |
|
8 |
dev-python/coverage: Bump to 6.3.3 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/coverage/Manifest | 1 + |
13 |
dev-python/coverage/coverage-6.3.3.ebuild | 64 +++++++++++++++++++++++++++++++ |
14 |
2 files changed, 65 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/coverage/Manifest b/dev-python/coverage/Manifest |
17 |
index b1d0f8be9c94..f7989c8cd0a4 100644 |
18 |
--- a/dev-python/coverage/Manifest |
19 |
+++ b/dev-python/coverage/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST coverage-6.3.2.tar.gz 709294 BLAKE2B 2da96731ee0065fb6139af7db073284a83efa135e7379d2a6d6e571cdf58c888cf72719fbddadb1bd8f62b0b155b8420a84377068c40e4c813533b3ad6b190a8 SHA512 d9ea3a93eefe2dbb723ed1eadb09dc1165c4f46e7186889ce3615411283baac1d80f04a3831208a164f99accea5d246d4613a7c2e909d2e63d3c714620432a16 |
22 |
+DIST coverage-6.3.3.tar.gz 710958 BLAKE2B 8bc1e9504e8f59bc2afea40c63958e463d2f6bfc5fa09c890c1c1f8e2ab502e6ad657edda5616f6a866f460b9f73cdda5ab081f8de281d23314f205d61c7621b SHA512 4b3f42602c50bf00a627ff40f3a04b1e8e457ad57759fb93dddb55eedd5ffe775fa81983f5f53502576b89c793c69a52a269148e7b028d5c87f0d4bf3a4d11b1 |
23 |
|
24 |
diff --git a/dev-python/coverage/coverage-6.3.3.ebuild b/dev-python/coverage/coverage-6.3.3.ebuild |
25 |
new file mode 100644 |
26 |
index 000000000000..5449963796c0 |
27 |
--- /dev/null |
28 |
+++ b/dev-python/coverage/coverage-6.3.3.ebuild |
29 |
@@ -0,0 +1,64 @@ |
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="https://coverage.readthedocs.io/en/latest/ https://pypi.org/project/coverage/" |
43 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
44 |
+ |
45 |
+LICENSE="BSD" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" |
48 |
+ |
49 |
+BDEPEND=" |
50 |
+ test? ( |
51 |
+ dev-python/flaky[${PYTHON_USEDEP}] |
52 |
+ dev-python/hypothesis[${PYTHON_USEDEP}] |
53 |
+ dev-python/pytest-xdist[${PYTHON_USEDEP}] |
54 |
+ >=dev-python/unittest-mixins-1.4[${PYTHON_USEDEP}] |
55 |
+ ) |
56 |
+" |
57 |
+ |
58 |
+distutils_enable_tests pytest |
59 |
+ |
60 |
+src_prepare() { |
61 |
+ sed -i -e '/^addopts/s:-q -n auto::' setup.cfg || die |
62 |
+ distutils-r1_src_prepare |
63 |
+} |
64 |
+ |
65 |
+test_tracer() { |
66 |
+ local -x COVERAGE_TEST_TRACER=${1} |
67 |
+ einfo " Testing with the ${COVERAGE_TEST_TRACER} tracer ..." |
68 |
+ epytest tests |
69 |
+} |
70 |
+ |
71 |
+python_test() { |
72 |
+ "${EPYTHON}" igor.py zip_mods || die |
73 |
+ |
74 |
+ local -x COVERAGE_TESTING=True |
75 |
+ # TODO: figure out why they can't be imported inside test env |
76 |
+ local -x COVERAGE_NO_CONTRACTS=1 |
77 |
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 |
78 |
+ local -x PYTEST_PLUGINS=_hypothesis_pytestplugin,flaky.flaky_pytest_plugin,xdist.plugin |
79 |
+ |
80 |
+ local prev_opt=$(shopt -p nullglob) |
81 |
+ shopt -s nullglob |
82 |
+ local c_ext=( "${BUILD_DIR}/install$(python_get_sitedir)"/coverage/*.so ) |
83 |
+ ${prev_opt} |
84 |
+ |
85 |
+ if [[ -n ${c_ext} ]]; then |
86 |
+ cp "${c_ext}" \ |
87 |
+ coverage/ || die |
88 |
+ test_tracer c |
89 |
+ rm coverage/*.so || die |
90 |
+ else |
91 |
+ test_tracer py |
92 |
+ fi |
93 |
+} |