*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / app-office / moneyguru / moneyguru-2.13.1-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_{6,7} )
7
8 inherit python-single-r1
9
10 DESCRIPTION="Future-aware personal finances management"
11 HOMEPAGE="https://hardcoded.net/moneyguru"
12 SRC_URI="https://download.hardcoded.net/${P}.tar.gz"
13
14 LICENSE="GPL-3+"
15 SLOT="0"
16 KEYWORDS="amd64"
17 IUSE="test"
18 RESTRICT="!test? ( test )"
19 REQUIRED_USE=${PYTHON_REQUIRED_USE}
20
21 RDEPEND="${PYTHON_DEPS}
22         dev-db/sqlite:3
23         dev-libs/glib:2
24         dev-python/PyQt5[${PYTHON_USEDEP},gui,widgets,printsupport]
25         dev-qt/qttranslations"
26 DEPEND="${RDEPEND}
27         test? (
28                 <dev-python/pytest-4[${PYTHON_USEDEP}]
29                 dev-util/cunit
30         )"
31
32 _emake() {
33         emake CFLAGS="\$(DEFAULT_CFLAGS) ${CFLAGS}" \
34                 SHEBANG="${PYTHON}" \
35                 DESTDIR="${ED}" \
36                 PREFIX=/usr \
37                 $@
38 }
39
40 src_compile() {
41         _emake
42 }
43
44 src_install() {
45         _emake install
46 }
47
48 src_test() {
49         emake -C ccore CFLAGS="\$(DEFAULT_CFLAGS) ${CFLAGS}" tests
50         pytest -vv core || die "Tests failed with ${EPYTHON}"
51 }