1 |
|
# Copyright 1999-2020 Gentoo Authors
|
|
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI=7
|
5 |
|
PYTHON_COMPAT=( python3_7 )
|
|
4 |
EAPI=8
|
|
5 |
|
|
6 |
DISTUTILS_USE_PEP517=setuptools
|
|
7 |
PYTHON_COMPAT=( python3_{10..11} )
|
6 |
8 |
inherit distutils-r1
|
|
9 |
|
7 |
10 |
DESCRIPTION="Console CardDAV client"
|
8 |
|
HOMEPAGE="https://github.com/scheibler/khard"
|
|
11 |
HOMEPAGE="
|
|
12 |
https://github.com/lucc/khard
|
|
13 |
https://pypi.org/project/khard/
|
|
14 |
"
|
|
15 |
|
9 |
16 |
LICENSE="GPL-3"
|
10 |
17 |
SLOT="0"
|
11 |
|
IUSE="test zsh-completion"
|
12 |
|
RESTRICT="!test? ( test )"
|
13 |
18 |
|
14 |
|
if [ "${PV}" == "9999" ]; then
|
|
19 |
if [[ "${PV}" == *9999 ]]; then
|
15 |
20 |
inherit git-r3
|
16 |
|
EGIT_REPO_URI="https://github.com/scheibler/khard"
|
|
21 |
EGIT_REPO_URI="https://github.com/lucc/khard"
|
17 |
22 |
else
|
18 |
|
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
19 |
|
KEYWORDS="amd64 ~arm64 ~x86"
|
|
23 |
inherit pypi
|
|
24 |
KEYWORDS="amd64 arm arm64 x86"
|
20 |
25 |
fi
|
21 |
26 |
|
|
27 |
IUSE=""
|
|
28 |
|
22 |
29 |
RDEPEND="
|
23 |
30 |
dev-python/atomicwrites[${PYTHON_USEDEP}]
|
24 |
31 |
dev-python/configobj[${PYTHON_USEDEP}]
|
25 |
32 |
dev-python/ruamel-yaml[${PYTHON_USEDEP}]
|
|
33 |
dev-python/ruamel-yaml-clib[${PYTHON_USEDEP}]
|
26 |
34 |
dev-python/unidecode[${PYTHON_USEDEP}]
|
27 |
|
>dev-python/vobject-0.9.3[${PYTHON_USEDEP}]
|
|
35 |
dev-python/vobject[${PYTHON_USEDEP}]
|
28 |
36 |
"
|
29 |
|
DEPEND="
|
30 |
|
dev-python/setuptools[${PYTHON_USEDEP}]
|
|
37 |
BDEPEND="
|
31 |
38 |
test? (
|
32 |
|
${RDEPEND}
|
|
39 |
dev-python/setuptools-scm[${PYTHON_USEDEP}]
|
|
40 |
)
|
|
41 |
doc? (
|
|
42 |
dev-python/sphinx-autoapi
|
|
43 |
dev-python/sphinx-rtd-theme
|
|
44 |
dev-python/sphinx-autodoc-typehints
|
33 |
45 |
)
|
34 |
46 |
"
|
35 |
|
# vobject-0.9.3 breaks khard, see
|
36 |
|
# https://github.com/scheibler/khard/issues/87
|
37 |
|
# https://github.com/eventable/vobject/issues/39
|
38 |
|
|
39 |
|
DOCS=( AUTHORS CHANGES README.md misc/khard/khard.conf.example )
|
40 |
|
|
41 |
|
src_install() {
|
42 |
|
distutils-r1_src_install
|
43 |
|
|
44 |
|
if use zsh-completion; then
|
45 |
|
insinto /usr/share/zsh/site-functions
|
46 |
|
doins misc/zsh/_khard
|
47 |
|
fi
|
|
47 |
|
|
48 |
DOCS=(
|
|
49 |
CHANGES
|
|
50 |
CONTRIBUTING.rst
|
|
51 |
README.md
|
|
52 |
doc/source/examples/khard.conf.example
|
|
53 |
)
|
|
54 |
|
|
55 |
distutils_enable_tests setup.py
|
|
56 |
distutils_enable_sphinx docs
|
|
57 |
|
|
58 |
python_compile_all() {
|
|
59 |
use doc && emake -j1 -C doc/ html text man info
|
48 |
60 |
}
|
49 |
61 |
|
50 |
|
python_test() {
|
51 |
|
esetup.py test
|
|
62 |
python_install_all() {
|
|
63 |
if use doc; then
|
|
64 |
DOCS+=( doc/build/text/. )
|
|
65 |
HTML_DOCS+=( doc/build/html/. )
|
|
66 |
|
|
67 |
doman doc/build/man/*
|
|
68 |
doinfo doc/build/texinfo/*.info
|
|
69 |
fi
|
|
70 |
|
|
71 |
insinto /usr/share/zsh/site-functions
|
|
72 |
doins misc/zsh/_khard
|
|
73 |
|
|
74 |
distutils-r1_python_install_all
|
52 |
75 |
}
|