diff options
Diffstat (limited to 'dev-python/cryptography/cryptography-2.8.ebuild')
| -rw-r--r-- | dev-python/cryptography/cryptography-2.8.ebuild | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/dev-python/cryptography/cryptography-2.8.ebuild b/dev-python/cryptography/cryptography-2.8.ebuild index 0a68d221c48b..777545258fb7 100644 --- a/dev-python/cryptography/cryptography-2.8.ebuild +++ b/dev-python/cryptography/cryptography-2.8.ebuild @@ -8,14 +8,17 @@ PYTHON_REQ_USE="threads(+)" inherit distutils-r1 flag-o-matic +VEC_P=cryptography_vectors-${PV} DESCRIPTION="Library providing cryptographic recipes and primitives" HOMEPAGE="https://github.com/pyca/cryptography/ https://pypi.org/project/cryptography/" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz + test? ( mirror://pypi/c/cryptography_vectors/${VEC_P}.tar.gz )" LICENSE="|| ( Apache-2.0 BSD )" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" -IUSE="libressl idna" +IUSE="libressl idna test" +RESTRICT="!test? ( test )" # the openssl 1.0.2l-r1 needs to be updated again :( # It'd theb be able to go into the || section again @@ -43,19 +46,22 @@ DEPEND="${RDEPEND} $(python_gen_cond_dep '>=dev-python/cffi-1.8:=[${PYTHON_USEDEP}]' 'python*') $(python_gen_cond_dep '!~dev-python/cffi-1.11.3[${PYTHON_USEDEP}]' 'python*') test? ( - ~dev-python/cryptography-vectors-${PV}[${PYTHON_USEDEP}] dev-python/pretend[${PYTHON_USEDEP}] dev-python/iso8601[${PYTHON_USEDEP}] dev-python/pytz[${PYTHON_USEDEP}] >=dev-python/hypothesis-1.11.4[${PYTHON_USEDEP}] !~dev-python/hypothesis-3.79.2[${PYTHON_USEDEP}] dev-python/pyasn1-modules[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] )" DOCS=( AUTHORS.rst CONTRIBUTING.rst README.rst ) -distutils_enable_tests pytest - python_configure_all() { append-cflags $(test-flags-CC -pthread) } + +python_test() { + local -x PYTHONPATH=${PYTHONPATH}:${WORKDIR}/${VEC_P} + pytest -vv || die "Tests fail with ${EPYTHON}" +} |
