1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python{3_6,3_7,3_8} )
7 PYTHON_REQ_USE="xml(+)"
9 inherit distutils-r1 virtualx
11 DESCRIPTION="Library for manipulating TrueType, OpenType, AFM and Type1 fonts"
12 HOMEPAGE="https://github.com/fonttools/fonttools/"
13 SRC_URI="https://github.com/fonttools/fonttools/archive/${PV}.tar.gz -> ${P}.tar.gz"
17 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 sparc x86"
18 RESTRICT="!test? ( test )"
24 >=dev-python/pytest-2.8[${PYTHON_USEDEP}]
26 >=dev-python/fs-2.4.9[${PYTHON_USEDEP}]
27 app-arch/brotli[python,${PYTHON_USEDEP}]
31 python_prepare_all() {
32 # When dev-python/pytest-shutil is installed, we get weird import errors.
33 # This is due to incomplete nesting in the Tests/ tree:
35 # Tests/feaLib/__init__.py
36 # Tests/ufoLib/__init__.py
37 # Tests/svgLib/path/__init__.py
38 # Tests/otlLib/__init__.py
39 # Tests/varLib/__init__.py
41 # This tree requires an __init__.py in Tests/svgLib/ too, bug #701148.
42 touch Tests/svgLib/__init__.py || die
44 distutils-r1_python_prepare_all
48 # virtualx used when matplotlib is installed causing plot module tests to run
49 virtx pytest -vv Tests fontTools