summaryrefslogtreecommitdiff
path: root/dev-python/pyblake2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-21 21:00:58 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-21 21:00:58 +0100
commit8b2628ad8526c806375e7b157889e4274b70248b (patch)
treeccba8cd56af7e086131454d6062d5d31115791df /dev-python/pyblake2
parentb620fb1b0929ff9657a2588aaa42b85e3021c102 (diff)
gentoo resync : 21.10.2017
Diffstat (limited to 'dev-python/pyblake2')
-rw-r--r--dev-python/pyblake2/Manifest3
-rw-r--r--dev-python/pyblake2/metadata.xml15
-rw-r--r--dev-python/pyblake2/pyblake2-0.9.3.ebuild34
3 files changed, 52 insertions, 0 deletions
diff --git a/dev-python/pyblake2/Manifest b/dev-python/pyblake2/Manifest
new file mode 100644
index 000000000000..4ebce7309f79
--- /dev/null
+++ b/dev-python/pyblake2/Manifest
@@ -0,0 +1,3 @@
+DIST pyblake2-0.9.3.tar.gz 130641 SHA256 626448e1fe1cc01d2197118954bec9f158378577e12686d5b01979f7f0fa2212 SHA512 6336a7f7e79bd3e6ff7f8ff4d279ae170e86f1464b9fa9e7ea7f0dbbac6fcc044caf225111e065f9cd9cdeea0f81fae8d373e1f65be3e418929f53fad063205e WHIRLPOOL 0d8f2aaf35a5eb0ebdedd9219a0ee8b126c93b11ae3e406ef637d8930a34783886b212ce50a33d677b0a19289cd32f40dc3da22a9a9fec108b481268f153d45b
+EBUILD pyblake2-0.9.3.ebuild 1066 SHA256 8487f1bd95367c3630a2519430fd81f0c0cd453728d07dd16f59367cb4fe0a99 SHA512 e9cfcdaaa84b37098e01d98dd4b2385614f44d53101ebb6b9a8a029c1105b7b84e06373d68bd5fcc2541d7f305bfe462a5c744e05372454f188ba952e12327d0 WHIRLPOOL 2dc90a66d924ea07dcc2fe7e95f48c9a6a6995dc366a379dbb4379131e3460516d76524d91068561c30f18d1c32b70d31c5fff3c5a43330c29729ff9b3650dc1
+MISC metadata.xml 452 SHA256 327935068e4b2311b5db81380ca0323b5bcf8b0769fce733e0407500bcdd58f0 SHA512 28acd5472435f8832eb8cb7587e651f428309e9a37c17cad378fe8f01c47896115c4d42ace1c6125eb99ddd30de562d42503b6dac42432b55b37775cdde7c1ff WHIRLPOOL afc476bc3e3dd531ec5e886e0180bd8a3a78bc274b410c6f54fbb24ab761c0e9bd95ba7bb5507aff0c162fc69c62a12dd4858e688aa21bca0e0b48509f87c3e1
diff --git a/dev-python/pyblake2/metadata.xml b/dev-python/pyblake2/metadata.xml
new file mode 100644
index 000000000000..98aa90fe67ab
--- /dev/null
+++ b/dev-python/pyblake2/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">dchest/pyblake2</remote-id>
+ <remote-id type="pypi">pyblake2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/pyblake2/pyblake2-0.9.3.ebuild b/dev-python/pyblake2/pyblake2-0.9.3.ebuild
new file mode 100644
index 000000000000..10da95058c15
--- /dev/null
+++ b/dev-python/pyblake2/pyblake2-0.9.3.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy )
+inherit distutils-r1
+
+DESCRIPTION="BLAKE2 hash function extension module"
+HOMEPAGE="https://github.com/dchest/pyblake2 https://pypi.python.org/pypi/pyblake2"
+SRC_URI="mirror://pypi/${PN::1}/${PN}/${P}.tar.gz"
+
+LICENSE="CC0-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86 ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="cpu_flags_x86_ssse3 cpu_flags_x86_avx cpu_flags_x86_xop"
+
+python_prepare_all() {
+ local impl=REGS
+ # note: SSE2 is 2.5x slower than pure REGS, so we ignore it
+ use cpu_flags_x86_ssse3 && impl=SSSE3
+ # this does not actually do anything but implicitly enabled SSE4.1...
+ use cpu_flags_x86_avx && impl=AVX
+ use cpu_flags_x86_xop && impl=XOP
+
+ # 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}"
+}