aboutsummaryrefslogtreecommitdiff
blob: 171b992a34717492547c17fffebbd1c634b77eb9 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{7..9} )

DISTUTILS_SINGLE_IMPL=1

inherit distutils-r1

DESCRIPTION="A double-entry accounting system that uses text files as input"
HOMEPAGE="https://github.com/beancount/beancount"
SRC_URI="https://github.com/beancount/beancount/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"

PATCHES=(
	"${FILESDIR}/${PN}-2.3.3-disable-network-tests.patch"
	"${FILESDIR}/${PN}-2.3.3-disable-tmp-access-tests.patch"
	"${FILESDIR}/${PN}-2.3.3-disable-install-test.patch"
)

RDEPEND="
	$(python_gen_cond_dep '
		dev-python/beautifulsoup4[${PYTHON_USEDEP}]
		>=dev-python/bottle-0.12[${PYTHON_USEDEP}]
		>=dev-python/google-api-python-client-1.8.2[${PYTHON_USEDEP}]
		>=dev-python/httplib2-0.10[${PYTHON_USEDEP}]
		>=dev-python/lxml-3.0[${PYTHON_USEDEP}]
		>=dev-python/oauth2client-4.0[${PYTHON_USEDEP}]
		>=dev-python/ply-3.4[${PYTHON_USEDEP}]
		>=dev-python/python-dateutil-2.6.0[${PYTHON_USEDEP}]
		>=dev-python/python-magic-0.4.12[${PYTHON_USEDEP}]
		>=dev-python/requests-2.0[${PYTHON_USEDEP}]
	')
"

BDEPEND="
	test? (
		${RDEPEND}
		$(python_gen_cond_dep '
			>=dev-python/pytest-5.4.2[${PYTHON_USEDEP}]
		')
	)
"

python_test(){
	esetup.py build_ext -i
	make ctest
	make test
}