dev-python/fido2: add missing RESTRICT="!test? ( test )"
[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 RESTRICT="!test? ( test )"
18
19 RDEPEND="
20         dev-python/six[${PYTHON_USEDEP}]
21         dev-python/cryptography[${PYTHON_USEDEP}]
22         dev-python/pyscard[${PYTHON_USEDEP}]
23         $(python_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' python2_7)
24         examples? (
25                 dev-python/flask[${PYTHON_USEDEP}]
26                 dev-python/pyopenssl[${PYTHON_USEDEP}]
27         )
28 "
29 DEPEND="
30         dev-python/setuptools[${PYTHON_USEDEP}]
31         test? (
32                 ${RDEPEND}
33                 dev-python/mock[${PYTHON_USEDEP}]
34                 dev-python/pyfakefs[${PYTHON_USEDEP}]
35         )
36 "
37
38 python_test() {
39         esetup.py test
40 }
41
42 python_install_all() {
43         distutils-r1_python_install_all
44
45         if use examples; then
46                 docinto examples
47                 dodoc -r "${S}"/examples/.
48                 docompress -x "/usr/share/doc/${PF}/examples"
49         fi
50 }