From c3e8a0f2587f714081e54509097d905be1baa9dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 21 Oct 2017 01:33:56 +0200 Subject: [PATCH] dev-python/pyblake2: Default to faster REGS variant --- dev-python/pyblake2/pyblake2-0.9.3.ebuild | 11 +++++++++++ 1 file changed, 11 insertions(+) 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}" } -- 2.26.2