From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 09AF4159C9B for ; Thu, 8 Aug 2024 03:08:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DA6B6E2A91; Thu, 8 Aug 2024 03:08:06 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B211EE2A91 for ; Thu, 8 Aug 2024 03:08:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8C9433430AD for ; Thu, 8 Aug 2024 03:08:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AC1B61EC8 for ; Thu, 8 Aug 2024 03:08:02 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1723086476.c3c0d62a64e8c9e92d581655f9c9d9aba574361c.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/crc32c/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/crc32c/Manifest dev-python/crc32c/crc32c-2.5.ebuild X-VCS-Directories: dev-python/crc32c/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: c3c0d62a64e8c9e92d581655f9c9d9aba574361c X-VCS-Branch: master Date: Thu, 8 Aug 2024 03:08:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6c7015be-db7c-4122-94a7-176f1f2518ff X-Archives-Hash: 41199a21823c82956699eaf399623ee0 commit: c3c0d62a64e8c9e92d581655f9c9d9aba574361c Author: Michał Górny gentoo org> AuthorDate: Thu Aug 8 02:54:04 2024 +0000 Commit: Michał Górny gentoo org> CommitDate: Thu Aug 8 03:07:56 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3c0d62a dev-python/crc32c: Bump to 2.5 Signed-off-by: Michał Górny gentoo.org> dev-python/crc32c/Manifest | 1 + dev-python/crc32c/crc32c-2.5.ebuild | 46 +++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/dev-python/crc32c/Manifest b/dev-python/crc32c/Manifest index 3b3b98df1856..326fbd5bbccd 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.5.tar.gz 41514 BLAKE2B a9424ef917f3c89f3b8b3881ccd5d59cb8a634d6177260ce9e7300e151e68e97e55b74448dd4cd545d2d66d2e2d8e70a085578719f768662542e43f06e914d20 SHA512 446f2290706eae8a625590c6b314d8422938dd9b8bffcf5e4dd6d3d260932548dbc5d9a9b6e7e5eaaaaac8dce424876f4e4acc9b0b1ea2b7cdc6ddd101228cfd diff --git a/dev-python/crc32c/crc32c-2.5.ebuild b/dev-python/crc32c/crc32c-2.5.ebuild new file mode 100644 index 000000000000..73c73f15b871 --- /dev/null +++ b/dev-python/crc32c/crc32c-2.5.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 +}