1 |
commit: 2a63857867e69f9ffa053987d6144849c162d544 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Feb 4 18:19:44 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 4 18:32:22 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a638578 |
7 |
|
8 |
dev-python/jaraco-packaging: Fix ns-caused import failures |
9 |
|
10 |
Closes: https://bugs.gentoo.org/832713 |
11 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
12 |
|
13 |
dev-python/jaraco-packaging/jaraco-packaging-8.2.1.ebuild | 11 +++++++++++ |
14 |
1 file changed, 11 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/jaraco-packaging/jaraco-packaging-8.2.1.ebuild b/dev-python/jaraco-packaging/jaraco-packaging-8.2.1.ebuild |
17 |
index b8a84cd90ee3..b81efcb5631b 100644 |
18 |
--- a/dev-python/jaraco-packaging/jaraco-packaging-8.2.1.ebuild |
19 |
+++ b/dev-python/jaraco-packaging/jaraco-packaging-8.2.1.ebuild |
20 |
@@ -27,3 +27,14 @@ BDEPEND=" |
21 |
|
22 |
distutils_enable_sphinx docs '>=dev-python/rst-linker-1.9' |
23 |
distutils_enable_tests pytest |
24 |
+ |
25 |
+src_test() { |
26 |
+ # create a pkgutil-style __init__.py in order to fix pytest's |
27 |
+ # determination of package paths |
28 |
+ # https://bugs.gentoo.org/832713 |
29 |
+ cat > jaraco/__init__.py <<-EOF || die |
30 |
+ __path__ = __import__('pkgutil').extend_path(__path__, __name__) |
31 |
+ EOF |
32 |
+ distutils-r1_src_test |
33 |
+ rm jaraco/__init__.py || die |
34 |
+} |