dev-python/virtualenv: arm64 keyworded (bug #700918)
[gentoo.git] / dev-python / cryptography / cryptography-2.8-r1.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=( python2_7 python3_{6,7,8} pypy3 )
7 PYTHON_REQ_USE="threads(+)"
8
9 inherit distutils-r1 flag-o-matic
10
11 VEC_P=cryptography_vectors-${PV}
12 DESCRIPTION="Library providing cryptographic recipes and primitives"
13 HOMEPAGE="https://github.com/pyca/cryptography/ https://pypi.org/project/cryptography/"
14 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
15         test? ( mirror://pypi/c/cryptography_vectors/${VEC_P}.tar.gz )"
16
17 LICENSE="|| ( Apache-2.0 BSD )"
18 SLOT="0"
19 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
20 IUSE="libressl idna test"
21 RESTRICT="!test? ( test )"
22
23 # the openssl 1.0.2l-r1 needs to be updated again :(
24 # It'd theb be able to go into the || section again
25 #=dev-libs/openssl-1.0.2l-r1:0
26 # the following is the original section, disallowing bindist entirely
27 #!libressl? ( >=dev-libs/openssl-1.0.2:0=[-bindist(-)] )
28 RDEPEND="
29         !libressl? (
30                 dev-libs/openssl:0= (
31                         || (
32                                 dev-libs/openssl:0[-bindist(-)]
33                                 >=dev-libs/openssl-1.0.2o-r6:0
34                         )
35                 )
36         )
37         libressl? ( dev-libs/libressl:0= )
38         idna? ( >=dev-python/idna-2.1[${PYTHON_USEDEP}] )
39         dev-python/setuptools[${PYTHON_USEDEP}]
40         >=dev-python/six-1.4.1[${PYTHON_USEDEP}]
41         $(python_gen_cond_dep '
42                 dev-python/enum34[${PYTHON_USEDEP}]
43                 dev-python/ipaddress[${PYTHON_USEDEP}]
44         ' -2)
45         $(python_gen_cond_dep '
46                 >=dev-python/cffi-1.8:=[${PYTHON_USEDEP}]
47                 !~dev-python/cffi-1.11.3[${PYTHON_USEDEP}]
48         ' 'python*')
49         "
50 DEPEND="${RDEPEND}
51         >=dev-python/setuptools-1.0[${PYTHON_USEDEP}]
52         test? (
53                 dev-python/pretend[${PYTHON_USEDEP}]
54                 dev-python/iso8601[${PYTHON_USEDEP}]
55                 dev-python/pytz[${PYTHON_USEDEP}]
56                 >=dev-python/hypothesis-1.11.4[${PYTHON_USEDEP}]
57                 !~dev-python/hypothesis-3.79.2[${PYTHON_USEDEP}]
58                 dev-python/pyasn1-modules[${PYTHON_USEDEP}]
59                 dev-python/pytest[${PYTHON_USEDEP}]
60         )"
61
62 DOCS=( AUTHORS.rst CONTRIBUTING.rst README.rst )
63
64 python_configure_all() {
65         append-cflags $(test-flags-CC -pthread)
66 }
67
68 python_test() {
69         local -x PYTHONPATH=${PYTHONPATH}:${WORKDIR}/${VEC_P}
70         pytest -vv || die "Tests fail with ${EPYTHON}"
71 }