From: Michał Górny Date: Fri, 20 Oct 2017 23:33:56 +0000 (+0200) Subject: dev-python/pyblake2: Default to faster REGS variant X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c3e8a0f2587f714081e54509097d905be1baa9dd;p=gentoo.git dev-python/pyblake2: Default to faster REGS variant --- diff --git a/dev-python/pyblake2/pyblake2-0.9.3.ebuild b/dev-python/pyblake2/pyblake2-0.9.3.ebuild index 37d5457bb6d5..79f80083bcb7 100644 --- a/dev-python/pyblake2/pyblake2-0.9.3.ebuild +++ b/dev-python/pyblake2/pyblake2-0.9.3.ebuild @@ -15,6 +15,17 @@ SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" +python_prepare_all() { + local impl=REGS + # note: SSE2 is 2.5x slower than pure REGS... + # TODO: test other variants on some capable hardware + + # uncomment the implementation of choice + sed -i -e "/BLAKE2_COMPRESS_${impl}/s:^#::" setup.py || die + + distutils-r1_python_prepare_all +} + python_test() { "${EPYTHON}" test/test.py || die "Tests fail with ${EPYTHON}" }