1 |
The test suites of pytest plugins cause additional *-pytest-*.pyc files |
2 |
to be created. Remove them in order to prevent them from being |
3 |
installed alongside the package. |
4 |
|
5 |
Closes: https://bugs.gentoo.org/847235 |
6 |
Signed-off-by: Michał Górny <mgorny@g.o> |
7 |
--- |
8 |
eclass/python-utils-r1.eclass | 5 +++++ |
9 |
1 file changed, 5 insertions(+) |
10 |
|
11 |
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass |
12 |
index 67dc5bf754d6..9eb068d3b13f 100644 |
13 |
--- a/eclass/python-utils-r1.eclass |
14 |
+++ b/eclass/python-utils-r1.eclass |
15 |
@@ -1318,6 +1318,11 @@ epytest() { |
16 |
|
17 |
# remove common temporary directories left over by pytest plugins |
18 |
rm -rf .hypothesis .pytest_cache || die |
19 |
+ # pytest plugins create additional .pyc files while testing |
20 |
+ # see e.g. https://bugs.gentoo.org/847235 |
21 |
+ if [[ -n ${BUILD_DIR} && -d ${BUILD_DIR} ]]; then |
22 |
+ find "${BUILD_DIR}" -name '*-pytest-*.pyc' -delete || die |
23 |
+ fi |
24 |
|
25 |
return ${ret} |
26 |
} |
27 |
-- |
28 |
2.35.1 |