summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-07-01 04:49:16 +0200
committerMichał Górny <mgorny@gentoo.org>2024-07-01 04:49:16 +0200
commitf264aac9a9cf1dda040dd28f75ff4e5a85857b98 (patch)
treecfa664f83743f2c111668624998a13ed090889a8 /dev-python/crc32c
parentdev-python/psycopg: Bump to 3.2.0 (diff)
downloadgentoo-f264aac9a9cf1dda040dd28f75ff4e5a85857b98.tar.gz
gentoo-f264aac9a9cf1dda040dd28f75ff4e5a85857b98.tar.bz2
gentoo-f264aac9a9cf1dda040dd28f75ff4e5a85857b98.zip
dev-python/crc32c: Bump to 2.4.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/crc32c')
-rw-r--r--dev-python/crc32c/Manifest1
-rw-r--r--dev-python/crc32c/crc32c-2.4.1.ebuild46
2 files changed, 47 insertions, 0 deletions
diff --git a/dev-python/crc32c/Manifest b/dev-python/crc32c/Manifest
index 1bbb68b67268..760df9c9fcc6 100644
--- a/dev-python/crc32c/Manifest
+++ b/dev-python/crc32c/Manifest
@@ -1 +1,2 @@
+DIST crc32c-2.4.1.tar.gz 38277 BLAKE2B 3d4a0eeb5811e8bc46df30b8890ab409de92dc3cfe2c5c3ab355df3394e56812c19ac26523be2cf9c33bb5825fb6e080b6f27ea77bed5c38d98fbe6c247653fb SHA512 005f95f66e97f552a83b5c94b706224f44280895d70c348fee86943bf1589a94b57eeddde5e18499fea9c77cbcbcfd5691d9d4b33ed788dc885a1333b6db476b
DIST crc32c-2.4.tar.gz 38272 BLAKE2B 1273f62794bd646e983737d922c4e1320a4519856b1cedf2d1d1f9b1e47fc767e248b6e00ada48e8f245e47fc18619327e9a8cfa5d88a0569c467ca6147a1974 SHA512 d747dee42184ff025dd6fd7334b65e5caba4066a055943a783b951d09e09339694072ea552aa95579f03a85a7bdb2eb4a8d12dc9a17f0f83d84c0fde534b36cb
diff --git a/dev-python/crc32c/crc32c-2.4.1.ebuild b/dev-python/crc32c/crc32c-2.4.1.ebuild
new file mode 100644
index 000000000000..73c73f15b871
--- /dev/null
+++ b/dev-python/crc32c/crc32c-2.4.1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( pypy3 python3_{10..13} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="CRC32c algorithm in hardware and software"
+HOMEPAGE="
+ https://github.com/ICRAR/crc32c/
+ https://pypi.org/project/crc32c/
+"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~sparc ~x86"
+# NB: these don't affect the build, they are only used for tests
+IUSE="cpu_flags_arm_crc32 cpu_flags_x86_sse4_2"
+
+distutils_enable_tests pytest
+
+python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ local -x CRC32C_SW_MODE
+
+ # force = run "software" code (i.e. unoptimized)
+ # none = run "hardware" code (i.e. SSE4.2 / ARMv8 CRC32)
+ for CRC32C_SW_MODE in none force; do
+ if [[ ${CRC32C_SW_MODE} == none ]]; then
+ if ! use cpu_flags_arm_crc32 && ! use cpu_flags_x86_sse4_2; then
+ continue
+ fi
+
+ # the test suite just skips all tests, so double-check
+ "${EPYTHON}" -c "import crc32c" ||
+ die "Importing crc32c failed (accelerated code path broken?)"
+ fi
+
+ einfo "Testing with CRC32C_SW_MODE=${CRC32C_SW_MODE}"
+ epytest
+ done
+}