summaryrefslogtreecommitdiff
path: root/dev-python/tables
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-08-15 12:22:30 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-08-15 12:22:30 +0100
commit3ad1879f00b279af69d6b9cd3ef97a2a7496d734 (patch)
tree497e5c46d6f6695b96866bc46abe1a2470a880b5 /dev-python/tables
parent792e307954fd3b5b12c968741d76ea7cfe5206e4 (diff)
gentoo auto-resync : 15:08:2024 - 12:22:30
Diffstat (limited to 'dev-python/tables')
-rw-r--r--dev-python/tables/Manifest3
-rw-r--r--dev-python/tables/files/tables-3.10.0-pypy.patch42
-rw-r--r--dev-python/tables/tables-3.10.0.ebuild80
3 files changed, 125 insertions, 0 deletions
diff --git a/dev-python/tables/Manifest b/dev-python/tables/Manifest
index f174a76a224d..ecc2121498f1 100644
--- a/dev-python/tables/Manifest
+++ b/dev-python/tables/Manifest
@@ -1,5 +1,8 @@
+AUX tables-3.10.0-pypy.patch 1755 BLAKE2B a08edae632ebddf56c38d57b839e1e4bb8206fe4800065a99833412826d17236a8c71bd42acda5ff70217b0456e560e4b9737dea48099701583acfe8e86411c1 SHA512 9f52467bc8bd49fa1745264372b5f833c4377c39207fafd78ecba3eea5a63524a7bf3f355ff482ae1f0196ed01087b0ae03d447453d0ce832e3e70a9546d2e2e
AUX tables-3.9.2-numpy-2.patch 10742 BLAKE2B 6c172a961e25d610b4f3cb72277512bcf8b493c5eec3122cd8a609ba6b8fef4b79d4c0c6b386b82cccabc8beeca54c05bd9057f655c2b5bb4f811a4ff747e639 SHA512 045fb1f3c2cc713f2e39aa6176190923a3441f473801f4258f2642324d2677f927bc34164911b5fee6ed88f4ed5589fafea0e113a5d426ffdc86eb46ce27fe0b
AUX tables-3.9.2-py313.patch 2674 BLAKE2B 5735b61bc189b3f09dda468e7e371db8b57a3dd49fd3363865afc9c9676b414d46b0b41e745aa6d90fca20ab43e0e778bf0638cb879c3c2a8efe444ed8348fb6 SHA512 7f649c331be6d6f096564d17704f738e3872a77272ea2561e83fcb8f778769dfdde1ebaeaa9d3d34d640954fb53056436bf513d2c52c33929937f704c68d546e
+DIST tables-3.10.0.tar.gz 4762618 BLAKE2B 351ec7e1bb9f0e4a43686b51911793aac32260d88418e1dac0b4fb815fd0f48543e139d1b7ea5607c1368578db4c6513a36d6379f4038cc53fbead4a436ce50d SHA512 10b4d2d1df5c692b72ad599cebc81fc2ef56f432a8d8059c2cede25a201076d12aff3e8874dafb8ef1d41dcc6c9151523f7e4fae3971443f79d051c6f8fcbc88
DIST tables-3.9.2.tar.gz 4683437 BLAKE2B 7044aede85d9eca67260a309d19b5c80944b80b2107f665296ad7ae6a3c3f9a8717a41ae7298a5ae45e5b9de7ae0a6678a83d4bd914bd8709512333e783367bc SHA512 9b416222304b7798585a20d4d7d61934023f151d4262a58a4f0ee969aa365264270c12a734461a194d2c857a13a8e09fb7a1386042267113f601560c041cecd9
+EBUILD tables-3.10.0.ebuild 1829 BLAKE2B 407f7ffc45926d634d690f4e3226eb457632876c5e93ba49f5efe02c7f5d73ff79d8014765f65bb6f6975254d3519c2b56c7b6282bacd2cded2d75770b59a6c1 SHA512 0f95141842113f489d57f3d844e6c85bf7fd70e33161d47a0d2b09538876ed812c6b6a7a1dc6dc893f8bb544b23102c6e73eaf4016541b8adfebaaa8d392a4d8
EBUILD tables-3.9.2-r1.ebuild 2284 BLAKE2B 534a4e7a23bb8b9991a70e6f99650007e6e61b7530e96e138948bb7a9233a021f718be1a3ecdeaf66cc7ab5b938a3de3b83695929c2005e469899cc7c1c84365 SHA512 04a9c7f1bce4953bdf50c5368e7ec6fec54ba53aed5d4cd2d1743952f0fa1c4656de01b82cb9c4f4ccf254a64ef33acd1c6200f14e98f52991ac4e11aecdc9e8
MISC metadata.xml 1090 BLAKE2B cc213079beb7f2888b5eab4886711fe8a4b7a4bc3cf13ff4d2247bd04edc05fdaed19c464ae28beac27de511ea997bcc873866bf9d544d6efe8cacd095e8640a SHA512 bd322eade443a3b1b610d262a0a6a30088246b3f772624fdfbf6eac85f240deb3f9001be1e2e20e334e65701c24e1d57100c67864d14067b1ae16e99f2136e8a
diff --git a/dev-python/tables/files/tables-3.10.0-pypy.patch b/dev-python/tables/files/tables-3.10.0-pypy.patch
new file mode 100644
index 000000000000..f27c99eadfb8
--- /dev/null
+++ b/dev-python/tables/files/tables-3.10.0-pypy.patch
@@ -0,0 +1,42 @@
+From c04a456a3e3f7c55722b8c77144991c657fc3af6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 14 Aug 2024 13:34:22 +0200
+Subject: [PATCH] FIX: Pass `refcheck=False` to `np.ndarray.resize()` for PyPy
+ compat
+
+Pass `refcheck=False` when resizing an `np.ndarray` in place, in order
+to fix a test failure on PyPy3:
+
+```
+Traceback (most recent call last):
+ File "/tmp/PyTables/tables/tests/test_direct_chunk.py", line 266, in test_write_chunk_missing1
+ return self._test_write_chunk_missing(shrink_after=False)
+ File "/tmp/PyTables/tables/tests/test_direct_chunk.py", line 255, in _test_write_chunk_missing
+ new_obj.resize(self.array.shape)
+ValueError: cannot resize an array with refcheck=True on PyPy.
+Use the np.resize function or refcheck=False
+```
+
+Since the object is created immediately above the `.resize()` call,
+adding `refcheck=False` should be entirely safe. Furthermore,
+unlike `np.resize()` this preserves the current behavior when new shape
+is larger than the original.
+
+Fixes #1202
+---
+ tables/tests/test_direct_chunk.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tables/tests/test_direct_chunk.py b/tables/tests/test_direct_chunk.py
+index ccc82516d..ed290d7e6 100644
+--- a/tables/tests/test_direct_chunk.py
++++ b/tables/tests/test_direct_chunk.py
+@@ -252,7 +252,7 @@ def _test_write_chunk_missing(self, shrink_after):
+ self.array.truncate(self.shape[0] - 1)
+
+ new_obj = self.obj.copy()
+- new_obj.resize(self.array.shape)
++ new_obj.resize(self.array.shape, refcheck=False)
+ obj_slice = tuple(slice(s, s + cs) for (s, cs)
+ in zip(chunk_start, self.chunkshape))
+ if not shrink_after:
diff --git a/dev-python/tables/tables-3.10.0.ebuild b/dev-python/tables/tables-3.10.0.ebuild
new file mode 100644
index 000000000000..c6e4633a70ff
--- /dev/null
+++ b/dev-python/tables/tables-3.10.0.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-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} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 prefix pypi
+
+DESCRIPTION="Hierarchical datasets for Python"
+HOMEPAGE="
+ https://www.pytables.org/
+ https://github.com/PyTables/PyTables/
+ https://pypi.org/project/tables/
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="+cpudetection examples test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ app-arch/bzip2:0=
+ app-arch/lz4:0=
+ >=app-arch/zstd-1.0.0:=
+ >=dev-libs/c-blosc-1.11.1:0=
+ >=dev-libs/c-blosc2-2.11.0:=
+ dev-libs/lzo:2=
+ >=dev-python/numpy-1.19.0:=[${PYTHON_USEDEP}]
+ >=sci-libs/hdf5-1.8.4:=
+"
+RDEPEND="
+ ${DEPEND}
+ >=dev-python/numexpr-2.6.2[${PYTHON_USEDEP}]
+ dev-python/packaging[${PYTHON_USEDEP}]
+ cpudetection? ( dev-python/py-cpuinfo[${PYTHON_USEDEP}] )
+"
+BDEPEND="
+ >=dev-python/cython-0.21[${PYTHON_USEDEP}]
+ virtual/pkgconfig
+ cpudetection? ( dev-python/py-cpuinfo[${PYTHON_USEDEP}] )
+ test? (
+ ${RDEPEND}
+ )
+"
+
+python_prepare_all() {
+ local PATCHES=(
+ # https://github.com/PyTables/PyTables/pull/1205
+ "${FILESDIR}/${P}-pypy.patch"
+ )
+
+ rm -r c-blosc/{blosc,internal-complibs} || die
+
+ distutils-r1_python_prepare_all
+
+ sed -i -e '/blosc2/d' -e '/numpy/s:, <2::' pyproject.toml || die
+ hprefixify -w '/prefixes =/' setup.py
+
+ export PYTABLES_NO_EMBEDDED_LIBS=1
+ export USE_PKGCONFIG=TRUE
+}
+
+python_test() {
+ cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
+ "${EPYTHON}" tables/tests/test_all.py -v || die
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use examples; then
+ dodoc -r contrib examples
+ docompress -x /usr/share/doc/${PF}/{contrib,examples}
+ fi
+}