# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 PYTHON_COMPAT=( python2_7 ) PYTHON_REQ_USE="threads(+)" inherit distutils-r1 flag-o-matic DESCRIPTION="Python Cryptography Toolkit" HOMEPAGE="https://www.dlitz.net/software/pycrypto/ https://pypi.org/project/pycrypto/" SRC_URI="http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/${P}.tar.gz" LICENSE="PSF-2 public-domain" SLOT="python2" KEYWORDS="~alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris" IUSE="doc +gmp test" RESTRICT="!test? ( test )" RDEPEND="gmp? ( dev-libs/gmp:0= ) ! Doc/index.html || die epydoc --config=Doc/epydoc-config --exclude-introspect="^Crypto\.(Random\.OSRNG\.nt|Util\.winrandom)$" || die HTML_DOCS=( Doc/apidoc/. Doc/index.html ) fi } python_compile() { local -x CFLAGS="${CFLAGS}" append-cflags -fno-strict-aliasing distutils-r1_python_compile } python_test() { esetup.py test }