dev-vcs/hg-git-0.9.0_rc1: version bump with mercurial 5.4 support
[gentoo.git] / mail-filter / afew / afew-3.0.0.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 DISTUTILS_SINGLE_IMPL=1
7 PYTHON_COMPAT=( python{3_6,3_7} )
8
9 inherit distutils-r1
10
11 DESCRIPTION="Initial tagging script for Notmuch"
12 HOMEPAGE="https://github.com/afewmail/afew"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
14
15 LICENSE="ISC"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="doc"
19
20 RDEPEND="
21         $(python_gen_cond_dep '
22                 dev-python/chardet[${PYTHON_MULTI_USEDEP}]
23                 dev-python/dkimpy[${PYTHON_MULTI_USEDEP}]
24                 net-mail/notmuch[python,${PYTHON_MULTI_USEDEP}]
25         ')"
26 DEPEND="
27         $(python_gen_cond_dep '
28                 dev-python/sphinx[${PYTHON_MULTI_USEDEP}]
29         ')"
30
31 DOCS=( "README.rst" )
32
33 python_prepare_all() {
34         sed -r \
35                 -e "s/^([[:space:]]+)use_scm_version=.*,$/\1version='${PV}',/" \
36                 -e "/^([[:space:]]+)setup_requires=.*,$/d" \
37                 -i setup.py || die
38         distutils-r1_python_prepare_all
39 }
40
41 python_compile_all() {
42         esetup.py build_sphinx -b man --build-dir=docs/build
43         use doc && esetup.py build_sphinx -b html --build-dir=docs/build
44 }
45
46 python_install_all() {
47         doman docs/build/man/*
48         dodoc afew/defaults/afew.config
49         use doc && local HTML_DOCS=( docs/build/html/. )
50 }