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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2E93E13835A for ; Mon, 12 Apr 2021 10:13:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 36A37E0822; Mon, 12 Apr 2021 10:13:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 12156E0822 for ; Mon, 12 Apr 2021 10:13:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 895DD340AB3 for ; Mon, 12 Apr 2021 10:13:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DBD6D632 for ; Mon, 12 Apr 2021 10:13:46 +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: <1618222397.61beab47461cbaf2f2467d25eb9808583c34f84a.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/h5py/files/, dev-python/h5py/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/h5py/files/h5py-3.2.1-i686-types.patch dev-python/h5py/h5py-3.2.1.ebuild X-VCS-Directories: dev-python/h5py/files/ dev-python/h5py/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 61beab47461cbaf2f2467d25eb9808583c34f84a X-VCS-Branch: master Date: Mon, 12 Apr 2021 10:13:46 +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: f78ec174-d94e-4e5c-896a-7bfb6eee5b2b X-Archives-Hash: 58c95445fe116db07ec37b3d091af261 commit: 61beab47461cbaf2f2467d25eb9808583c34f84a Author: Michał Górny gentoo org> AuthorDate: Mon Apr 12 10:13:17 2021 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon Apr 12 10:13:17 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61beab47 dev-python/h5py: Fix skipping inconvenient types on x86 Closes: https://bugs.gentoo.org/782238 Signed-off-by: Michał Górny gentoo.org> dev-python/h5py/files/h5py-3.2.1-i686-types.patch | 55 +++++++++++++++++++++++ dev-python/h5py/h5py-3.2.1.ebuild | 4 ++ 2 files changed, 59 insertions(+) diff --git a/dev-python/h5py/files/h5py-3.2.1-i686-types.patch b/dev-python/h5py/files/h5py-3.2.1-i686-types.patch new file mode 100644 index 00000000000..80bbb112e7b --- /dev/null +++ b/dev-python/h5py/files/h5py-3.2.1-i686-types.patch @@ -0,0 +1,55 @@ +From 76c9c8c4049943c490556fa888cf7743d1a677e5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Mon, 12 Apr 2021 11:48:16 +0200 +Subject: [PATCH] TST: Skip problematic datatypes based on their length + +Filter datatypes for tests based on their length rather than keeping +a list of illegal platform+type combinations. This is more robust +than the previous solution and fixes the test failures with new numpy +versions (1.19.5 is the oldest I have tested) that declare 'float96' +and 'complex192' on i686 rather than 'float128' and 'complex256'. + +This fixes the following test failure: + + E AttributeError: module 'numpy' has no attribute 'float128' + +plus, later on (again): + + E TypeError: Illegal length 24 for complex dtype +--- + h5py/tests/test_dtype.py | 12 +++--------- + 1 file changed, 3 insertions(+), 9 deletions(-) + +diff --git a/h5py/tests/test_dtype.py b/h5py/tests/test_dtype.py +index c5fac97e..ec4eda21 100644 +--- a/h5py/tests/test_dtype.py ++++ b/h5py/tests/test_dtype.py +@@ -13,8 +13,6 @@ except ImportError: + + from .common import ut, TestCase + +-UNSUPPORTED_LONG_DOUBLE = ('i386', 'i486', 'i586', 'i686', 'ppc64le') +- + + class TestVlen(TestCase): + +@@ -289,13 +287,9 @@ class TestOffsets(TestCase): + if (np.issubdtype(f, np.floating) or + np.issubdtype(f, np.complexfloating))) + +- if platform.machine() in UNSUPPORTED_LONG_DOUBLE: +- dtype_dset_map = {str(j): d +- for j, d in enumerate(dtypes) +- if d not in (np.float128, np.complex256)} +- else: +- dtype_dset_map = {str(j): d +- for j, d in enumerate(dtypes)} ++ dtype_dset_map = {str(j): d ++ for j, d in enumerate(dtypes) ++ if d().nbytes in [4, 8, 16, 32]} + + fname = self.mktemp() + +-- +2.31.1 + diff --git a/dev-python/h5py/h5py-3.2.1.ebuild b/dev-python/h5py/h5py-3.2.1.ebuild index 9ece42a61cf..89ba32dc7da 100644 --- a/dev-python/h5py/h5py-3.2.1.ebuild +++ b/dev-python/h5py/h5py-3.2.1.ebuild @@ -45,6 +45,10 @@ distutils_enable_sphinx docs \ # use mpi && export CC=mpicc #} +PATCHES=( + "${FILESDIR}"/h5py-3.2.1-i686-types.patch +) + python_prepare_all() { # avoid pytest-mpi dep, we do not use mpi anyway sed -i -e 's:pytest-mpi::' pytest.ini || die