1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6..7} )
10 DESCRIPTION="Python interface to some openssl function based on ctypes module"
11 HOMEPAGE="https://github.com/vbwagner/ctypescrypto"
12 if [ "${PV}" = "9999" ]; then
13 EGIT_REPO_URI="https://github.com/vbwagner/ctypescrypto.git"
16 SRC_URI="https://github.com/vbwagner/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
23 RESTRICT="!test? ( test )"
24 REQUIRED_USE="test? ( gost )"
26 RDEPEND="gost? ( dev-libs/gost-engine:= )"
27 BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
29 python_prepare_all() {
31 rm tests/testpkey.py || die "rm failed"
33 sed -i '/test_verify_by_filestore/i\\ @unittest.skip("disable")' \
34 tests/testx509.py || die "sed failed for tests/testx509.py"
36 distutils-r1_python_prepare_all
40 "${PYTHON}" -m unittest discover -v tests || die "tests failed with ${EPYTHON}"