aboutsummaryrefslogtreecommitdiffstats
path: root/app-office/beancount/beancount-9999.ebuild
blob: 8a0889d179016f3f053365551577bad727d4709c (plain) (blame)
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
57
58
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
PYTHON_COMPAT=( python3_{9,10} )
DISTUTILS_USE_SETUPTOOLS="rdepend"

inherit distutils-r1 elisp-common

DESCRIPTION="Command-line Double-Entry Accounting"
HOMEPAGE="http://furius.ca/beancount https://pypi.org/project/beancount"

if [[ ${PV} == 9999* ]] ; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/beancount/beancount"
	EGIT_BRANCH="v2"
else
	SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
	KEYWORDS="amd64 x86"
fi

LICENSE="GPL-2"
SLOT="0"
IUSE="emacs"

SITEFILE="50{PN}-mode-gentoo.el"

RDEPEND="
	$(python_gen_cond_dep '
		dev-python/beautifulsoup4[${PYTHON_USEDEP}]
		>=dev-python/click-7.0[${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}]
		dev-python/pytest[${PYTHON_USEDEP}]
	')
"

python_compile_all() {
	use emacs && elisp-compile editors/emacs/beancount.el
}

python_install_all() {
	rm -rf "${ED}/usr/elisp" || die "removing elisp files failed"

	distutils-r1_python_install_all

	if use emacs; then
		elisp-install ${PN} editors/emacs/beancount.el
		elisp-site-file-install "${FILESDIR}/${SITEFILE}"
	fi
}