*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / app-crypt / yubikey-manager / yubikey-manager-3.1.0-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python{2_7,3_6} )
7 inherit readme.gentoo-r1 distutils-r1
8
9 DESCRIPTION="Python library and command line tool for configuring a YubiKey"
10 HOMEPAGE="https://developers.yubico.com/yubikey-manager/"
11 # Per https://github.com/Yubico/yubikey-manager/issues/217, Yubico is
12 # the official source for tarballs, not Github
13 SRC_URI="https://developers.yubico.com/${PN}/Releases/${P}.tar.gz"
14
15 LICENSE="BSD-2"
16 SLOT="0"
17 KEYWORDS="amd64 x86"
18 IUSE="test"
19 RESTRICT="!test? ( test )"
20
21 RDEPEND="
22         dev-python/click[${PYTHON_USEDEP}]
23         dev-python/cryptography[${PYTHON_USEDEP}]
24         $(python_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' python2_7)
25         >=dev-python/fido2-0.7.0[${PYTHON_USEDEP}]
26         <dev-python/fido2-0.8.0[${PYTHON_USEDEP}]
27         dev-python/pyopenssl[${PYTHON_USEDEP}]
28         dev-python/pyscard[${PYTHON_USEDEP}]
29         dev-python/pyusb[${PYTHON_USEDEP}]
30         dev-python/six[${PYTHON_USEDEP}]
31         >=sys-auth/ykpers-1.19.0
32 "
33 DEPEND="
34         dev-python/setuptools[${PYTHON_USEDEP}]
35         test? (
36                 ${RDEPEND}
37                 $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' 'python2_7')
38         )
39 "
40
41 python_test() {
42         esetup.py test
43 }
44
45 python_install_all() {
46         local DOC_CONTENTS
47
48         distutils-r1_python_install_all
49
50         DOC_CONTENTS="
51                 The 'openpgp' command may require the package 'app-crypt/ccid'
52                 to be installed on the system. Furthermore, make sure that pcscd
53                 daemon is running and has correct access permissions to USB
54                 devices.
55         "
56         readme.gentoo_create_doc
57
58         doman "${S}"/man/ykman.1
59 }
60
61 pkg_postinst() {
62         readme.gentoo_print_elog
63 }