*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / secretstorage / secretstorage-3.1.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 PYTHON_COMPAT=( pypy3 python3_{6,7} )
7
8 inherit distutils-r1
9
10 MY_PN="SecretStorage"
11
12 DESCRIPTION="Python bindings to FreeDesktop.org Secret Service API."
13 HOMEPAGE="https://github.com/mitya57/secretstorage https://pypi.org/project/SecretStorage/"
14 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
15
16 LICENSE="BSD"
17 SLOT="0"
18 KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
19 IUSE="doc test"
20 RESTRICT="!test? ( test )"
21
22 RDEPEND="
23         dev-python/cryptography[${PYTHON_USEDEP}]
24         dev-python/jeepney[${PYTHON_USEDEP}]
25 "
26 BDEPEND="
27         dev-python/setuptools[${PYTHON_USEDEP}]
28         doc? (
29                 dev-python/sphinx[${PYTHON_USEDEP}]
30                 dev-python/alabaster[${PYTHON_USEDEP}]
31         )
32         test? ( ${RDEPEND} )
33 "
34
35 S="${WORKDIR}/${MY_PN}-${PV}"
36
37 python_compile_all() {
38         if use doc; then
39                 sphinx-build docs docs/_build/html || die
40                 HTML_DOCS=( docs/_build/html/. )
41         fi
42 }
43
44 python_test() {
45         dbus-run-session "${EPYTHON}" -m unittest discover -v -s tests \
46                 || die "tests failed with ${EPYTHON}"
47 }