summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-02-04 19:29:46 +0100
committerMichał Górny <mgorny@gentoo.org>2022-02-04 19:32:23 +0100
commit25fb81458668d3f0c2d68b49ba79048bc752587d (patch)
tree77c7be4614b36610cd31b97688ccd321450f07dd /dev-python/jaraco-itertools
parentdev-python/jaraco-packaging: Switch to PEP 517 build (diff)
downloadgentoo-25fb81458668d3f0c2d68b49ba79048bc752587d.tar.gz
gentoo-25fb81458668d3f0c2d68b49ba79048bc752587d.tar.bz2
gentoo-25fb81458668d3f0c2d68b49ba79048bc752587d.zip
dev-python/jaraco-itertools: Fix ns-caused import failures
Closes: https://bugs.gentoo.org/832714 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/jaraco-itertools')
-rw-r--r--dev-python/jaraco-itertools/jaraco-itertools-6.0.3.ebuild8
1 files changed, 6 insertions, 2 deletions
diff --git a/dev-python/jaraco-itertools/jaraco-itertools-6.0.3.ebuild b/dev-python/jaraco-itertools/jaraco-itertools-6.0.3.ebuild
index db86fa022f88..68c9258b26b8 100644
--- a/dev-python/jaraco-itertools/jaraco-itertools-6.0.3.ebuild
+++ b/dev-python/jaraco-itertools/jaraco-itertools-6.0.3.ebuild
@@ -31,7 +31,11 @@ distutils_enable_tests pytest
export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
python_test() {
- # needed for doctests to work
- > jaraco/__init__.py || die
+ # create a pkgutil-style __init__.py in order to fix pytest's
+ # determination of package paths
+ cat > jaraco/__init__.py <<-EOF || die
+ __path__ = __import__('pkgutil').extend_path(__path__, __name__)
+ EOF
epytest --doctest-modules
+ rm jaraco/__init__.py || die
}