diff options
Diffstat (limited to 'dev-python/crc32c')
-rw-r--r-- | dev-python/crc32c/Manifest | 2 | ||||
-rw-r--r-- | dev-python/crc32c/crc32c-2.6.ebuild | 46 |
2 files changed, 48 insertions, 0 deletions
diff --git a/dev-python/crc32c/Manifest b/dev-python/crc32c/Manifest index e3a2e0ca33bd..4eddcfdca5aa 100644 --- a/dev-python/crc32c/Manifest +++ b/dev-python/crc32c/Manifest @@ -1,5 +1,7 @@ DIST crc32c-2.4.1.tar.gz 38277 BLAKE2B 3d4a0eeb5811e8bc46df30b8890ab409de92dc3cfe2c5c3ab355df3394e56812c19ac26523be2cf9c33bb5825fb6e080b6f27ea77bed5c38d98fbe6c247653fb SHA512 005f95f66e97f552a83b5c94b706224f44280895d70c348fee86943bf1589a94b57eeddde5e18499fea9c77cbcbcfd5691d9d4b33ed788dc885a1333b6db476b DIST crc32c-2.5.tar.gz 41514 BLAKE2B a9424ef917f3c89f3b8b3881ccd5d59cb8a634d6177260ce9e7300e151e68e97e55b74448dd4cd545d2d66d2e2d8e70a085578719f768662542e43f06e914d20 SHA512 446f2290706eae8a625590c6b314d8422938dd9b8bffcf5e4dd6d3d260932548dbc5d9a9b6e7e5eaaaaac8dce424876f4e4acc9b0b1ea2b7cdc6ddd101228cfd +DIST crc32c-2.6.tar.gz 42985 BLAKE2B 0193b26a56c6a2ec071231815cfcdf8ab3ce58de98e2948ab68c8ccd5779772923c8fd1464c70376ade8d4a6a38a575f8330791b7cda8de82d001a869b22e7e2 SHA512 7ca2614994b558c0f9b12fb743b0dadcfd6e6e3ab71c7550fd892324a91a90816b2dadf9c9946078e0ee2cd4abe14fdca385421bcd9468e41fd656a080b4d52e EBUILD crc32c-2.4.1.ebuild 1190 BLAKE2B e3bd619bf25c288df490d4c07f53e98a5a6fefe47c7c765558e9ac6f56eddd1f25054e8d41e7f5bf7b878b6c67f2421592f4b798351e86ee54baa93728397b39 SHA512 861a360abf34b9211588d379140ae8fd5259a106efd55f8a567d924e4d220a19ea16e4c019fe90e092afd10f3d0e9ff0ff082a8b1c18bab53eb6ac180ced8785 EBUILD crc32c-2.5.ebuild 1190 BLAKE2B e3bd619bf25c288df490d4c07f53e98a5a6fefe47c7c765558e9ac6f56eddd1f25054e8d41e7f5bf7b878b6c67f2421592f4b798351e86ee54baa93728397b39 SHA512 861a360abf34b9211588d379140ae8fd5259a106efd55f8a567d924e4d220a19ea16e4c019fe90e092afd10f3d0e9ff0ff082a8b1c18bab53eb6ac180ced8785 +EBUILD crc32c-2.6.ebuild 1190 BLAKE2B e3bd619bf25c288df490d4c07f53e98a5a6fefe47c7c765558e9ac6f56eddd1f25054e8d41e7f5bf7b878b6c67f2421592f4b798351e86ee54baa93728397b39 SHA512 861a360abf34b9211588d379140ae8fd5259a106efd55f8a567d924e4d220a19ea16e4c019fe90e092afd10f3d0e9ff0ff082a8b1c18bab53eb6ac180ced8785 MISC metadata.xml 340 BLAKE2B 51d7b138caeb04c73b96d68973194bee9c7af76811fa6c886c5aa80415624d00adee76c4187f52bcc740a5f0fafbebd2b9207c5dac3ab191799598c2d5aa275d SHA512 b6c86d6aacc37c0c1fac0382407b9d8821a939e322281192254d95d1b066088268730f1ad7031b3ce9e9aa324db412a0a8ed060ab75d23155e2e682c6d80a93c diff --git a/dev-python/crc32c/crc32c-2.6.ebuild b/dev-python/crc32c/crc32c-2.6.ebuild new file mode 100644 index 000000000000..73c73f15b871 --- /dev/null +++ b/dev-python/crc32c/crc32c-2.6.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 +} |