dev-python/secretstorage: Keyword 3.1.2 ppc, #726188
[gentoo.git] / dev-python / secretstorage / secretstorage-3.1.2.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,8,9} )
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 S="${WORKDIR}/${MY_PN}-${PV}"
16
17 LICENSE="BSD"
18 SLOT="0"
19 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
20
21 RDEPEND="
22         dev-python/cryptography[${PYTHON_USEDEP}]
23         >=dev-python/jeepney-0.4.2[${PYTHON_USEDEP}]
24 "
25 BDEPEND="
26         test? ( !hppa? ( !sparc? (
27                 gnome-base/gnome-keyring
28                 sys-apps/dbus
29         ) ) )
30 "
31
32 distutils_enable_tests unittest
33 distutils_enable_sphinx docs \
34         dev-python/alabaster
35
36 src_test() {
37         case ${ARCH} in
38                 hppa|sparc)
39                         einfo "gnome-keyring is not supported on ${ARCH}, skipping tests"
40                         return
41                         ;;
42         esac
43
44         distutils-r1_src_test
45 }
46
47 python_test() {
48         dbus-run-session "${EPYTHON}" -m unittest discover -v -s tests \
49                 || die "tests failed with ${EPYTHON}"
50 }