commit: e78205a6a55eb2be760a3544a0d331e5e9766b39
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 5 16:55:51 2023 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jan 5 16:56:01 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e78205a6
dev-python/pytest-cov: Fix linking coverage for tests on Prefix
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/pytest-cov/pytest-cov-4.0.0-r1.ebuild | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dev-python/pytest-cov/pytest-cov-4.0.0-r1.ebuild
b/dev-python/pytest-cov/pytest-cov-4.0.0-r1.ebuild
index 50a1d98287f1..56d8ce2bc1bb 100644
--- a/dev-python/pytest-cov/pytest-cov-4.0.0-r1.ebuild
+++ b/dev-python/pytest-cov/pytest-cov-4.0.0-r1.ebuild
@@ -53,9 +53,12 @@ python_test() {
tests/test_pytest_cov.py::test_contexts
)
+ local src=$(
+ "${EPYTHON}" -c "import coverage as m; print(*m.__path__)" ||
die
+ )
# TODO: why do we need to do that?!
# https://github.com/pytest-dev/pytest-cov/issues/517
- ln -s "${BROOT}$(python_get_sitedir)/coverage" \
+ ln -s "${src}/coverage" \
"${BUILD_DIR}/install$(python_get_sitedir)/coverage" || die
epytest