From: David Seifert Date: Wed, 11 Dec 2019 20:25:45 +0000 (+0100) Subject: dev-python/fonttools: Add fix for dev-python/pytest-shutil fallout X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=bd6639ba383164ab4516fc9469172767912f5b47;p=gentoo.git dev-python/fonttools: Add fix for dev-python/pytest-shutil fallout * When dev-python/pytest-shutil is installed, pytest fails importing all tests. Closes: https://bugs.gentoo.org/701148 Package-Manager: Portage-2.3.81, Repoman-2.3.20 Signed-off-by: David Seifert --- diff --git a/dev-python/fonttools/fonttools-3.44.0.ebuild b/dev-python/fonttools/fonttools-3.44.0.ebuild index 918fed19314e..e40211f5842d 100644 --- a/dev-python/fonttools/fonttools-3.44.0.ebuild +++ b/dev-python/fonttools/fonttools-3.44.0.ebuild @@ -32,6 +32,22 @@ DEPEND="${RDEPEND} ) )" +python_prepare_all() { + # When dev-python/pytest-shutil is installed, we get weird import errors. + # This is due to incomplete nesting in the Tests/ tree: + # + # Tests/feaLib/__init__.py + # Tests/ufoLib/__init__.py + # Tests/svgLib/path/__init__.py + # Tests/otlLib/__init__.py + # Tests/varLib/__init__.py + # + # This tree requires an __init__.py in Tests/svgLib/ too, bug #701148. + touch Tests/svgLib/__init__.py || die + + distutils-r1_python_prepare_all +} + python_test() { # virtualx used when matplotlib is installed causing plot module tests to run virtx pytest -vv Tests fontTools || die "pytest failed" diff --git a/dev-python/fonttools/fonttools-4.0.1.ebuild b/dev-python/fonttools/fonttools-4.0.1.ebuild index 011b1b059a24..ded54f5648f3 100644 --- a/dev-python/fonttools/fonttools-4.0.1.ebuild +++ b/dev-python/fonttools/fonttools-4.0.1.ebuild @@ -29,6 +29,22 @@ DEPEND="${RDEPEND} app-arch/zopfli )" +python_prepare_all() { + # When dev-python/pytest-shutil is installed, we get weird import errors. + # This is due to incomplete nesting in the Tests/ tree: + # + # Tests/feaLib/__init__.py + # Tests/ufoLib/__init__.py + # Tests/svgLib/path/__init__.py + # Tests/otlLib/__init__.py + # Tests/varLib/__init__.py + # + # This tree requires an __init__.py in Tests/svgLib/ too, bug #701148. + touch Tests/svgLib/__init__.py || die + + distutils-r1_python_prepare_all +} + python_test() { # virtualx used when matplotlib is installed causing plot module tests to run virtx pytest -vv Tests fontTools || die "pytest failed" diff --git a/dev-python/fonttools/fonttools-4.1.0.ebuild b/dev-python/fonttools/fonttools-4.1.0.ebuild index 3e2e55324904..7501d28d43e7 100644 --- a/dev-python/fonttools/fonttools-4.1.0.ebuild +++ b/dev-python/fonttools/fonttools-4.1.0.ebuild @@ -29,6 +29,22 @@ DEPEND="${RDEPEND} app-arch/zopfli )" +python_prepare_all() { + # When dev-python/pytest-shutil is installed, we get weird import errors. + # This is due to incomplete nesting in the Tests/ tree: + # + # Tests/feaLib/__init__.py + # Tests/ufoLib/__init__.py + # Tests/svgLib/path/__init__.py + # Tests/otlLib/__init__.py + # Tests/varLib/__init__.py + # + # This tree requires an __init__.py in Tests/svgLib/ too, bug #701148. + touch Tests/svgLib/__init__.py || die + + distutils-r1_python_prepare_all +} + python_test() { # virtualx used when matplotlib is installed causing plot module tests to run virtx pytest -vv Tests fontTools || die "pytest failed"