summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-08-26 16:54:52 +0200
committerMichał Górny <mgorny@gentoo.org>2024-08-26 16:54:52 +0200
commit3282dd1b09e327afc9c39b059c618cc014210b7e (patch)
tree066d86244a5a8ff7752ee1fe384453d6ae9fe74c /dev-python
parentdev-lang/julia: mark as LTO-unsafe (diff)
downloadgentoo-3282dd1b09e327afc9c39b059c618cc014210b7e.tar.gz
gentoo-3282dd1b09e327afc9c39b059c618cc014210b7e.tar.bz2
gentoo-3282dd1b09e327afc9c39b059c618cc014210b7e.zip
dev-python/crc32c: Bump to 2.7_p1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/crc32c/Manifest1
-rw-r--r--dev-python/crc32c/crc32c-2.7_p1.ebuild46
2 files changed, 47 insertions, 0 deletions
diff --git a/dev-python/crc32c/Manifest b/dev-python/crc32c/Manifest
index d448fd9abcb4..a9cdd4f15cc5 100644
--- a/dev-python/crc32c/Manifest
+++ b/dev-python/crc32c/Manifest
@@ -1 +1,2 @@
DIST crc32c-2.6.tar.gz 42985 BLAKE2B 0193b26a56c6a2ec071231815cfcdf8ab3ce58de98e2948ab68c8ccd5779772923c8fd1464c70376ade8d4a6a38a575f8330791b7cda8de82d001a869b22e7e2 SHA512 7ca2614994b558c0f9b12fb743b0dadcfd6e6e3ab71c7550fd892324a91a90816b2dadf9c9946078e0ee2cd4abe14fdca385421bcd9468e41fd656a080b4d52e
+DIST crc32c-2.7.post1.tar.gz 45229 BLAKE2B 37276efdeb3a3e23bd57795db775441b04d3a72db69dc3a5e9649404c5297ba2d3de39612f906e88f79d1fb39e83cd8a6b5d2d18dda23e6d5c1ccb4779edc557 SHA512 d529de2ec37c8fb4742db515d51d1dde4344617477d2a0c602baeb5f38446a7adda77fa63e3ff1a7e50a25dde147b86fd63a1d83f8f76bbbdf047280799cf360
diff --git a/dev-python/crc32c/crc32c-2.7_p1.ebuild b/dev-python/crc32c/crc32c-2.7_p1.ebuild
new file mode 100644
index 000000000000..73c73f15b871
--- /dev/null
+++ b/dev-python/crc32c/crc32c-2.7_p1.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
+}