aboutsummaryrefslogtreecommitdiff
blob: 76567e93ba4daf11568f5272f7c9431452aa6139 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

DISTUTILS_USE_SETUPTOOLS=pyproject.toml
PYTHON_COMPAT=( python3_{8..9} )

inherit distutils-r1

SRC_URI="https://github.com/daltonmaag/statmake/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
DESCRIPTION="Generate STAT tables for variable fonts from .stylespace files"
HOMEPAGE="https://github.com/daltonmaag/statmake"
LICENSE="MIT"
SLOT="0"
IUSE="test"

RDEPEND="
	dev-python/fonttools[${PYTHON_USEDEP}]
	dev-python/cattrs[${PYTHON_USEDEP}]
"
DEPEND="
	${RDEPEND}
	test? (
		dev-python/ufo2ft[${PYTHON_USEDEP}]
	)
"

distutils_enable_tests pytest

python_install() {
	distutils-r1_python_install --skip-build
	python_domodule "src/${PN}"
}

python_test() {
	local -x PYTHONPATH="${S}/src:${PYTHONPATH}"
	epytest -vv || die "Tests fail with ${EPYTHON}"
}