1 |
commit: 25fb81458668d3f0c2d68b49ba79048bc752587d |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Feb 4 18:29:46 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 4 18:32:23 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25fb8145 |
7 |
|
8 |
dev-python/jaraco-itertools: Fix ns-caused import failures |
9 |
|
10 |
Closes: https://bugs.gentoo.org/832714 |
11 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
12 |
|
13 |
dev-python/jaraco-itertools/jaraco-itertools-6.0.3.ebuild | 8 ++++++-- |
14 |
1 file changed, 6 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/dev-python/jaraco-itertools/jaraco-itertools-6.0.3.ebuild b/dev-python/jaraco-itertools/jaraco-itertools-6.0.3.ebuild |
17 |
index db86fa022f88..68c9258b26b8 100644 |
18 |
--- a/dev-python/jaraco-itertools/jaraco-itertools-6.0.3.ebuild |
19 |
+++ b/dev-python/jaraco-itertools/jaraco-itertools-6.0.3.ebuild |
20 |
@@ -31,7 +31,11 @@ distutils_enable_tests pytest |
21 |
export SETUPTOOLS_SCM_PRETEND_VERSION=${PV} |
22 |
|
23 |
python_test() { |
24 |
- # needed for doctests to work |
25 |
- > jaraco/__init__.py || die |
26 |
+ # create a pkgutil-style __init__.py in order to fix pytest's |
27 |
+ # determination of package paths |
28 |
+ cat > jaraco/__init__.py <<-EOF || die |
29 |
+ __path__ = __import__('pkgutil').extend_path(__path__, __name__) |
30 |
+ EOF |
31 |
epytest --doctest-modules |
32 |
+ rm jaraco/__init__.py || die |
33 |
} |