dev-python/fonttools: Add fix for dev-python/pytest-shutil fallout
authorDavid Seifert <soap@gentoo.org>
Wed, 11 Dec 2019 20:25:45 +0000 (21:25 +0100)
committerDavid Seifert <soap@gentoo.org>
Wed, 11 Dec 2019 20:25:45 +0000 (21:25 +0100)
* 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 <soap@gentoo.org>
dev-python/fonttools/fonttools-3.44.0.ebuild
dev-python/fonttools/fonttools-4.0.1.ebuild
dev-python/fonttools/fonttools-4.1.0.ebuild

index 918fed19314edc02cba1af756588f62f79d01764..e40211f5842d32d356e78e692eb1f408649dc190 100644 (file)
@@ -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"
index 011b1b059a24674a50d60a3fbca70f01dc6ea5cb..ded54f5648f3bbdb35ea87714de921368883d0b3 100644 (file)
@@ -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"
index 3e2e55324904d2aa62108d96aa54e9456002587d..7501d28d43e7a023f03d2dc306e4e599cc658d98 100644 (file)
@@ -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"