1 |
commit: c3e8a0f2587f714081e54509097d905be1baa9dd |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 20 23:33:56 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 20 23:44:08 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3e8a0f2 |
7 |
|
8 |
dev-python/pyblake2: Default to faster REGS variant |
9 |
|
10 |
dev-python/pyblake2/pyblake2-0.9.3.ebuild | 11 +++++++++++ |
11 |
1 file changed, 11 insertions(+) |
12 |
|
13 |
diff --git a/dev-python/pyblake2/pyblake2-0.9.3.ebuild b/dev-python/pyblake2/pyblake2-0.9.3.ebuild |
14 |
index 37d5457bb6d..79f80083bcb 100644 |
15 |
--- a/dev-python/pyblake2/pyblake2-0.9.3.ebuild |
16 |
+++ b/dev-python/pyblake2/pyblake2-0.9.3.ebuild |
17 |
@@ -15,6 +15,17 @@ SLOT="0" |
18 |
KEYWORDS="~amd64 ~x86" |
19 |
IUSE="" |
20 |
|
21 |
+python_prepare_all() { |
22 |
+ local impl=REGS |
23 |
+ # note: SSE2 is 2.5x slower than pure REGS... |
24 |
+ # TODO: test other variants on some capable hardware |
25 |
+ |
26 |
+ # uncomment the implementation of choice |
27 |
+ sed -i -e "/BLAKE2_COMPRESS_${impl}/s:^#::" setup.py || die |
28 |
+ |
29 |
+ distutils-r1_python_prepare_all |
30 |
+} |
31 |
+ |
32 |
python_test() { |
33 |
"${EPYTHON}" test/test.py || die "Tests fail with ${EPYTHON}" |
34 |
} |