bc1d3938cb32d480bcf4a23bf0fd45c9a4f1fcde
[gentoo.git] / dev-python / fido2 / fido2-0.7.0.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python{2_7,3_{5,6}} )
7 inherit distutils-r1
8
9 DESCRIPTION="Python based FIDO 2.0 library"
10 HOMEPAGE="https://github.com/Yubico/python-fido2"
11 SRC_URI="https://github.com/Yubico/python-fido2/releases/download/${PV}/${P}.tar.gz"
12
13 LICENSE="Apache-2.0 BSD-2 MIT MPL-2.0"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="examples test"
17
18 RDEPEND="
19         dev-python/six[${PYTHON_USEDEP}]
20         dev-python/cryptography[${PYTHON_USEDEP}]
21         dev-python/pyscard[${PYTHON_USEDEP}]
22         $(python_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' python2_7)
23         examples? (
24                 dev-python/flask[${PYTHON_USEDEP}]
25                 dev-python/pyopenssl[${PYTHON_USEDEP}]
26         )
27 "
28 DEPEND="
29         dev-python/setuptools[${PYTHON_USEDEP}]
30         test? (
31                 ${RDEPEND}
32                 dev-python/mock[${PYTHON_USEDEP}]
33                 dev-python/pyfakefs[${PYTHON_USEDEP}]
34         )
35 "
36
37 python_test() {
38         esetup.py test
39 }
40
41 python_install_all() {
42         distutils-r1_python_install_all
43
44         if use examples; then
45                 docinto examples
46                 dodoc -r "${S}"/examples/.
47                 docompress -x "/usr/share/doc/${PF}/examples"
48         fi
49 }