commit:     c3e8a0f2587f714081e54509097d905be1baa9dd
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 20 23:33:56 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Oct 20 23:44:08 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3e8a0f2

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 37d5457bb6d..79f80083bcb 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}"
 }

Reply via email to