e588fbf094d3469cb036d404eb6eccec2675b1c0
[gentoo.git] / dev-python / pynacl / pynacl-1.2.1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 python3_{5,6,7})
7
8 inherit distutils-r1
9
10 DESCRIPTION="Python binding to the Networking and Cryptography (NaCl) library"
11 HOMEPAGE="https://github.com/pyca/pynacl/ https://pypi.org/project/PyNaCl/"
12 SRC_URI="https://github.com/pyca/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
13
14 LICENSE="Apache-2.0"
15 SLOT="0"
16 KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ppc ppc64 s390 sparc x86"
17 IUSE="test"
18 RESTRICT="!test? ( test )"
19
20 RDEPEND="
21         dev-python/six[${PYTHON_USEDEP}]
22         >=dev-python/cffi-1.4.1[${PYTHON_USEDEP}]
23         dev-libs/libsodium:0/23
24 "
25 DEPEND="${RDEPEND}
26         dev-python/setuptools[${PYTHON_USEDEP}]
27         test? ( >=dev-python/hypothesis-3.27.0[${PYTHON_USEDEP}]
28                 >=dev-python/pytest-3.2.1[${PYTHON_USEDEP}] )
29 "
30
31 src_prepare() {
32         # For not using the bundled libsodium
33         export SODIUM_INSTALL=system
34         distutils-r1_python_prepare_all
35 }
36
37 python_test() {
38         py.test -v || die "Tests failed under ${EPYTHON}"
39 }