commit:     bd6639ba383164ab4516fc9469172767912f5b47
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 11 20:25:45 2019 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed Dec 11 20:25:45 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd6639ba

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 <soap <AT> gentoo.org>

 dev-python/fonttools/fonttools-3.44.0.ebuild | 16 ++++++++++++++++
 dev-python/fonttools/fonttools-4.0.1.ebuild  | 16 ++++++++++++++++
 dev-python/fonttools/fonttools-4.1.0.ebuild  | 16 ++++++++++++++++
 3 files changed, 48 insertions(+)

diff --git a/dev-python/fonttools/fonttools-3.44.0.ebuild 
b/dev-python/fonttools/fonttools-3.44.0.ebuild
index 918fed19314..e40211f5842 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 011b1b059a2..ded54f5648f 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 3e2e5532490..7501d28d43e 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"

Reply via email to