diff options
| author | Michał Górny <mgorny@gentoo.org> | 2025-10-18 07:54:40 +0200 |
|---|---|---|
| committer | Michał Górny <mgorny@gentoo.org> | 2025-10-18 07:54:40 +0200 |
| commit | f0c7a6f7203ff907a43dc16bb4b8d6090bf939d6 (patch) | |
| tree | 4c3a26295122f231799675dcfd27485524e773c4 /dev-python | |
| parent | 67ebc8c3a2c11fc1cab324b24b94dbc6b7169fc0 (diff) | |
| download | gentoo-f0c7a6f7203ff907a43dc16bb4b8d6090bf939d6.tar.gz gentoo-f0c7a6f7203ff907a43dc16bb4b8d6090bf939d6.tar.bz2 gentoo-f0c7a6f7203ff907a43dc16bb4b8d6090bf939d6.zip | |
dev-python/crc32c: Bump to 2.8
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
| -rw-r--r-- | dev-python/crc32c/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/crc32c/crc32c-2.8.ebuild | 46 |
2 files changed, 47 insertions, 0 deletions
diff --git a/dev-python/crc32c/Manifest b/dev-python/crc32c/Manifest index 928222683398..841687fb5dea 100644 --- a/dev-python/crc32c/Manifest +++ b/dev-python/crc32c/Manifest @@ -1 +1,2 @@ DIST crc32c-2.7.1.post0.tar.gz 46574 BLAKE2B e4241f9ba5416323130b80510e5adff0f0adc3f29a3565ab62af32754d452eba90c934ead2468e0c3525fbbdb2e7742bf86130e9be86e9f08d70bc1232a8026f SHA512 d89a9b34db7b9cf9b8255105c3054b1aa4de7c391630720f4df226e4efcc6a860c3eb5b18a9e1baee8dc9422c7ffa0c2067c5700aff53d3072b47a1c3b33d864 +DIST crc32c-2.8.tar.gz 48179 BLAKE2B 8a4a91d068fe2baed4f4f089fef77ef9f3fd24d0e10c029500740f04b09150eeeea761fe919968253bbf83bb084a91b2ae0a0cc9f3db509701e75f67110858ab SHA512 10f139333f912d62dee4b6c21590b3182c3e6652e31aceb1bdec28ca8817ef8aa26abec3f44e6a271cb5c4f8c4abd8942b56e4642a9ab434cb41866c1ce03e19 diff --git a/dev-python/crc32c/crc32c-2.8.ebuild b/dev-python/crc32c/crc32c-2.8.ebuild new file mode 100644 index 000000000000..731192ee18ba --- /dev/null +++ b/dev-python/crc32c/crc32c-2.8.ebuild @@ -0,0 +1,46 @@ +# Copyright 2024-2025 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_11 python3_{11..14} ) + +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" + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest + +python_test() { + 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 +} |
