commit:     6ed4d325a2563a195b41caef2c2c58ca18581e40
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 28 15:06:59 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Dec 28 15:31:55 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ed4d325

dev-python/pytables: Bump to 3.8.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pytables/Manifest                       |  1 +
 .../pytables/files/pytables-3.8.0-blosc2.patch     | 30 ++++++++
 dev-python/pytables/pytables-3.8.0.ebuild          | 83 ++++++++++++++++++++++
 3 files changed, 114 insertions(+)

diff --git a/dev-python/pytables/Manifest b/dev-python/pytables/Manifest
index c456f554b2d0..ea9d491502ea 100644
--- a/dev-python/pytables/Manifest
+++ b/dev-python/pytables/Manifest
@@ -1 +1,2 @@
 DIST tables-3.7.0.tar.gz 8227955 BLAKE2B 
0d5b7b765375c4787f1210138e5fd02e3c0ce429ef209a3a8d4fd3bc094f68486ab6f4d0a960ce86efea6991ed691ef2a3e9e8f37a49fe91cb8d6372cadea80e
 SHA512 
eaa368d063b5fad87e6d0f9ab6f02da0b2a3542740a52fe8c2bb58e41121495d07b6d2710ad402a28891294aa61a11238c6a7e2cf2933a1bb11391b79cf4fd13
+DIST tables-3.8.0.tar.gz 8014052 BLAKE2B 
28d120ad609ebc9ae8cd97286bb3fb9c484bd8a179edcf0de1b96e4400b7a21b4db835d94fae3aaee84924bd46b84b84da12c538b39517362d805651e7aa3aef
 SHA512 
1616c00787a2e88ff3dc2aebe3a1b2ad428b5a8ea48fc94058b49c509f1c040b540b3f62551b16b3246d2fed58e0b33443cbdaaf1dfcba5a6eead5f3e8028029

diff --git a/dev-python/pytables/files/pytables-3.8.0-blosc2.patch 
b/dev-python/pytables/files/pytables-3.8.0-blosc2.patch
new file mode 100644
index 000000000000..59403cdec12d
--- /dev/null
+++ b/dev-python/pytables/files/pytables-3.8.0-blosc2.patch
@@ -0,0 +1,30 @@
+From 99a7f336635aaeb666ea8dc791743177a030dc18 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgo...@gentoo.org>
+Date: Wed, 28 Dec 2022 15:53:08 +0100
+Subject: [PATCH] Workaround blosc2 detection via blosc2 package
+
+---
+ setup.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 966be028..2708deb9 100755
+--- a/setup.py
++++ b/setup.py
+@@ -262,11 +262,11 @@ if __name__ == "__main__":
+ 
+     debug = "--debug" in sys.argv
+ 
+-    blosc2_inc, blosc2_lib = get_blosc2_directories()
++    blosc2_inc, blosc2_lib = "", ""
+ 
+     # Global variables
+     lib_dirs = [blosc2_lib]
+-    inc_dirs = [Path("hdf5-blosc/src"), Path("hdf5-blosc2/src"), blosc2_inc]
++    inc_dirs = [Path("hdf5-blosc/src"), Path("hdf5-blosc2/src")]
+     optional_libs = []
+     copy_libs = []
+ 
+-- 
+2.39.0
+

diff --git a/dev-python/pytables/pytables-3.8.0.ebuild 
b/dev-python/pytables/pytables-3.8.0.ebuild
new file mode 100644
index 000000000000..889a681566ed
--- /dev/null
+++ b/dev-python/pytables/pytables-3.8.0.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+MY_PN=tables
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Hierarchical datasets for Python"
+HOMEPAGE="
+       https://www.pytables.org/
+       https://github.com/PyTables/PyTables/
+       https://pypi.org/project/tables/
+"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="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:=
+       dev-libs/lzo:2=
+       >=dev-python/numpy-1.19[${PYTHON_USEDEP}]
+       >=sci-libs/hdf5-1.8.4:=
+"
+RDEPEND="
+       ${DEPEND}
+       >=dev-python/numexpr-2.6.2[${PYTHON_USEDEP}]
+       dev-python/packaging[${PYTHON_USEDEP}]
+       dev-python/py-cpuinfo[${PYTHON_USEDEP}]
+"
+BDEPEND="
+       >=dev-python/cython-0.21[${PYTHON_USEDEP}]
+       dev-python/py-cpuinfo[${PYTHON_USEDEP}]
+       virtual/pkgconfig
+       test? (
+               ${RDEPEND}
+       )
+"
+
+python_prepare_all() {
+       local PATCHES=(
+               "${FILESDIR}"/${P}-blosc2.patch
+       )
+
+       export PYTABLES_NO_EMBEDDED_LIBS=1
+       export USE_PKGCONFIG=TRUE
+
+       rm -r c-blosc/{blosc,internal-complibs} || die
+       rm tables/libblosc2.so || die
+       distutils-r1_python_prepare_all
+}
+
+python_compile() {
+       distutils-r1_python_compile -j1
+}
+
+python_test() {
+       cd "${BUILD_DIR}"/lib* || 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
+}

Reply via email to