Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/coverage/
Date: Mon, 27 Feb 2023 05:38:27
Message-Id: 1677476293.5956792c324b8d54adcc7c63cbeb5cea1f8bdf29.mgorny@gentoo
1 commit: 5956792c324b8d54adcc7c63cbeb5cea1f8bdf29
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 27 05:25:56 2023 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 27 05:38:13 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5956792c
7
8 dev-python/coverage: Bump to 7.2.1
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/coverage/Manifest | 1 +
13 dev-python/coverage/coverage-7.2.1.ebuild | 77 +++++++++++++++++++++++++++++++
14 2 files changed, 78 insertions(+)
15
16 diff --git a/dev-python/coverage/Manifest b/dev-python/coverage/Manifest
17 index f1ed3d0513de..51319692f837 100644
18 --- a/dev-python/coverage/Manifest
19 +++ b/dev-python/coverage/Manifest
20 @@ -1,3 +1,4 @@
21 DIST coverage-7.0.5.tar.gz 796171 BLAKE2B 87ecffd87c2465607bf1fd330296e84e174953d7696ee0ef3046f6555f54634cfc643ada2a03971685021a5cf59191d75a0bddbc83f736e11a2516c684b0f0d9 SHA512 d199d710cdfac5c6cde79224b4a27d6b88a0e0c504eff7ad5700e9fb1f5cc8e1e9359dcc12f6c447a7ee6cd680feeb89f70ad68574a739c55a6d09b22017df06
22 DIST coverage-7.1.0.tar.gz 809785 BLAKE2B 3720aee79ecfdd6aa652b5198bad4d6b5827a85f1d58986eec51bab1e72800dac28eb0ebbeb15d547ef03694ca1397bec47c37a9233dc34b2d3d2a6a22a48274 SHA512 80920b337391e47f1e631ba8a892792b6d2c72e753ddf403222c6ad527637699889f29cfee40721949e5eeb6e7977f319635c44d79f58e7e19676d1165dfdde2
23 DIST coverage-7.2.0.tar.gz 812120 BLAKE2B 17851996635a1621643e64025ba43f11d7e844fb8757c5bfd6794dbff85cf2c218dc61119c8604f19f951c83264eb13f9c8f0cf7f070f6b213603b25b756a59c SHA512 a913c257702a77b115b6519c0feaf9336973330c9264cb376453555c30f305db2b924d5dd8ff7b58bb89d9f1765b069512929d1ccc9c1c234bdd08d6fc82213b
24 +DIST coverage-7.2.1.tar.gz 812219 BLAKE2B bb6b482990b0620d7e264244a9e31ee44b37fe83436c1d7d016d20e36d9ecbea85a614a4142683757bb1284bfbe2a157fc4748b01c76b5495c5eca5834e9a848 SHA512 40a7f1d25c7100b8f2f4ba1f877c241f65e1f560cdad861dab05254a4e177de37615888441d47a6c2ebc525ad2b52b476da7111efe5583708f094dd3a1b39984
25
26 diff --git a/dev-python/coverage/coverage-7.2.1.ebuild b/dev-python/coverage/coverage-7.2.1.ebuild
27 new file mode 100644
28 index 000000000000..b83e4bdd6609
29 --- /dev/null
30 +++ b/dev-python/coverage/coverage-7.2.1.ebuild
31 @@ -0,0 +1,77 @@
32 +# Copyright 1999-2023 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +DISTUTILS_USE_PEP517=setuptools
38 +PYTHON_COMPAT=( python3_{9..11} pypy3 )
39 +PYTHON_REQ_USE="threads(+),sqlite(+)"
40 +
41 +inherit distutils-r1 pypi
42 +
43 +DESCRIPTION="Code coverage measurement for Python"
44 +HOMEPAGE="
45 + https://coverage.readthedocs.io/en/latest/
46 + https://github.com/nedbat/coveragepy/
47 + https://pypi.org/project/coverage/
48 +"
49 +
50 +LICENSE="BSD"
51 +SLOT="0"
52 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
53 +
54 +RDEPEND="
55 + $(python_gen_cond_dep '
56 + dev-python/tomli[${PYTHON_USEDEP}]
57 + ' 3.{8..10})
58 +"
59 +BDEPEND="
60 + test? (
61 + dev-python/flaky[${PYTHON_USEDEP}]
62 + dev-python/hypothesis[${PYTHON_USEDEP}]
63 + dev-python/pytest-xdist[${PYTHON_USEDEP}]
64 + >=dev-python/unittest-mixins-1.4[${PYTHON_USEDEP}]
65 + )
66 +"
67 +
68 +distutils_enable_tests pytest
69 +
70 +src_prepare() {
71 + sed -i -e '/^addopts/s:-q -n auto::' setup.cfg || die
72 + distutils-r1_src_prepare
73 +}
74 +
75 +test_tracer() {
76 + local -x COVERAGE_TEST_TRACER=${1}
77 + einfo " Testing with the ${COVERAGE_TEST_TRACER} tracer ..."
78 + epytest tests
79 +}
80 +
81 +python_test() {
82 + local EPYTEST_IGNORE=(
83 + # pip these days insists on fetching build deps from Internet
84 + tests/test_venv.py
85 + )
86 +
87 + "${EPYTHON}" igor.py zip_mods || die
88 +
89 + local -x COVERAGE_TESTING=True
90 + # TODO: figure out why they can't be imported inside test env
91 + local -x COVERAGE_NO_CONTRACTS=1
92 + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
93 + local -x PYTEST_PLUGINS=_hypothesis_pytestplugin,flaky.flaky_pytest_plugin,xdist.plugin
94 +
95 + local prev_opt=$(shopt -p nullglob)
96 + shopt -s nullglob
97 + local c_ext=( "${BUILD_DIR}/install$(python_get_sitedir)"/coverage/*.so )
98 + ${prev_opt}
99 +
100 + if [[ -n ${c_ext} ]]; then
101 + cp "${c_ext}" \
102 + coverage/ || die
103 + test_tracer c
104 + rm coverage/*.so || die
105 + else
106 + test_tracer py
107 + fi
108 +}