diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-10-05 17:54:48 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-10-05 17:54:48 +0100 |
commit | 8679463887b182c233b55d8112534d7d7dcde08b (patch) | |
tree | 3c45a448a6022fda1b09ac5ef94b5c02ddcc9b30 /dev-python/tables | |
parent | e8c80f80fd116cc679f261d8bc6ee6c9bfc3f0a0 (diff) |
gentoo auto-resync : 05:10:2023 - 17:54:48
Diffstat (limited to 'dev-python/tables')
-rw-r--r-- | dev-python/tables/Manifest | 8 | ||||
-rw-r--r-- | dev-python/tables/files/tables-3.8.0-blosc2.patch | 30 | ||||
-rw-r--r-- | dev-python/tables/files/tables-3.8.0-cython3.patch | 40 | ||||
-rw-r--r-- | dev-python/tables/files/tables-3.8.0-optional-cpuinfo.patch | 69 | ||||
-rw-r--r-- | dev-python/tables/metadata.xml | 27 | ||||
-rw-r--r-- | dev-python/tables/tables-3.8.0-r3.ebuild | 84 | ||||
-rw-r--r-- | dev-python/tables/tables-3.9.0.ebuild | 73 |
7 files changed, 331 insertions, 0 deletions
diff --git a/dev-python/tables/Manifest b/dev-python/tables/Manifest new file mode 100644 index 000000000000..41fb988cb0e4 --- /dev/null +++ b/dev-python/tables/Manifest @@ -0,0 +1,8 @@ +AUX tables-3.8.0-blosc2.patch 842 BLAKE2B 1ab97a9b0d5c5e435671c00cb8d5ab77048f9eea493a716846e7d350f902487c2098d43d194c5373ca4297f0d266b723a3d9eb59f69836278adfbb4a75c22820 SHA512 b64944a0916b7da5543b518e16fc70ead6b2f7c0bfdb79bf0e49549067464997b9906bb2b1d0d02b32abbe315135c09e64ffec91fc57b8f87117c33564684b25 +AUX tables-3.8.0-cython3.patch 1443 BLAKE2B 064d0175ecd337d3e5628da11c784158d40459da40d5e2a9ee38033e5ab6bcb6e3bfeda5b67f5e3768c3a7554740dcbd2c063f7a786dbdbf40bc603c75f091d5 SHA512 ae3c76ba53b02f0168f1cf997980e2cfa20634348238be5bec0e9f0693d0b719ce4d7b9c547a0e635cc160c75e95bfc15181c82b5199bf2a9978a878aa894c3e +AUX tables-3.8.0-optional-cpuinfo.patch 3185 BLAKE2B 1e5afa906c427408a81b477f4d6aa09ee903d73db3cee048464b277a69ee0f96cdc23ca660d4eb68b49ae4d88386711e5340cb4deae4632a8af0512ca5b64437 SHA512 3f9da3a9f2a95d80b2af458744a369a45725aa72fa64a316f6e281695e710aadf0d785cc80fd25639a032a9b3bf04a3f06c73c21b1812656251e8ebdaf842032 +DIST tables-3.8.0.tar.gz 8014052 BLAKE2B 28d120ad609ebc9ae8cd97286bb3fb9c484bd8a179edcf0de1b96e4400b7a21b4db835d94fae3aaee84924bd46b84b84da12c538b39517362d805651e7aa3aef SHA512 1616c00787a2e88ff3dc2aebe3a1b2ad428b5a8ea48fc94058b49c509f1c040b540b3f62551b16b3246d2fed58e0b33443cbdaaf1dfcba5a6eead5f3e8028029 +DIST tables-3.9.0.tar.gz 4682294 BLAKE2B a4ff5a67c0376e90ca4f1f405878ead3bbb807b2fc972ba17a1026782adb473a26e15561ba13fb3c477defe3157ead20cf672d7150735fd5555821d1091d9b3f SHA512 2f7e14af6a1759c16a3d79c6b26276aed49ddfcb60f8e157646f0e59f1b9abc405961dab48b55ddfaf046e69b39552a2d003d5ff7734edb195027f9cd6dab684 +EBUILD tables-3.8.0-r3.ebuild 1870 BLAKE2B 2bcb99c28f91f33f731cc0289c25ddcb9a2d0435204dce09412af73ffb9091b7ada68a6a2535cdf7a391bcabe3e9f119154913a2d6bb1b6e2a8799b2153399ed SHA512 97e3c843f14e50d569ad7d7c52caa368e2cae5bbb3a2b4e25290758965c22e57055e0f72a3097f9ddc36f27e7c9e79899b46b99fe6ac3bbc19f654c5e9f36a35 +EBUILD tables-3.9.0.ebuild 1697 BLAKE2B 905de64dc23fb7d90bffef5dac8eb5ee82a3ae4132c1609a70a0f319e9bbd4d26bc717d9726f7b5a576fa328ee6394699113a6bf2996fd13651dd8ce3e58c46a SHA512 bf96c5daa82b4b94197d1906258081d5d83062b7e5efb3da8f0596b2ac8fee1f901a7d63a96985d12631dd544c66b9364f3219be80002079ebe64bcc34e22820 +MISC metadata.xml 1090 BLAKE2B cc213079beb7f2888b5eab4886711fe8a4b7a4bc3cf13ff4d2247bd04edc05fdaed19c464ae28beac27de511ea997bcc873866bf9d544d6efe8cacd095e8640a SHA512 bd322eade443a3b1b610d262a0a6a30088246b3f772624fdfbf6eac85f240deb3f9001be1e2e20e334e65701c24e1d57100c67864d14067b1ae16e99f2136e8a diff --git a/dev-python/tables/files/tables-3.8.0-blosc2.patch b/dev-python/tables/files/tables-3.8.0-blosc2.patch new file mode 100644 index 000000000000..59403cdec12d --- /dev/null +++ b/dev-python/tables/files/tables-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?= <mgorny@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/tables/files/tables-3.8.0-cython3.patch b/dev-python/tables/files/tables-3.8.0-cython3.patch new file mode 100644 index 000000000000..9ad0b72d224a --- /dev/null +++ b/dev-python/tables/files/tables-3.8.0-cython3.patch @@ -0,0 +1,40 @@ +From a70e36f0b0d4fb15b0b50e7ca513c4e4452767cc Mon Sep 17 00:00:00 2001 +From: Matus Valo <matusvalo@gmail.com> +Date: Wed, 15 Mar 2023 22:49:07 +0100 +Subject: [PATCH] Fix build errors when compiled using cython 3.0.0b1. + +--- + pyproject.toml | 2 +- + tables/tableextension.pyx | 2 +- + tables/utilsextension.pyx | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tables/tableextension.pyx b/tables/tableextension.pyx +index 8f3bb01b..4a50c6ab 100644 +--- a/tables/tableextension.pyx ++++ b/tables/tableextension.pyx +@@ -37,7 +37,7 @@ from .utils import SizeType + from .utilsextension cimport get_native_type, cstr_to_pystr + + # numpy functions & objects +-from hdf5extension cimport Leaf ++from .hdf5extension cimport Leaf + from cpython cimport PyErr_Clear + from libc.stdio cimport snprintf + from libc.stdlib cimport malloc, free +diff --git a/tables/utilsextension.pyx b/tables/utilsextension.pyx +index 5b16dcd3..664e1ea5 100644 +--- a/tables/utilsextension.pyx ++++ b/tables/utilsextension.pyx +@@ -344,7 +344,7 @@ except ImportError: + #--------------------------------------------------------------------- + + # Error handling helpers +-cdef herr_t e_walk_cb(unsigned n, const H5E_error_t *err, void *data) with gil: ++cdef herr_t e_walk_cb(unsigned n, const H5E_error_t *err, void *data) noexcept with gil: + cdef object bt = <object>data # list + #cdef char major_msg[256] + #cdef char minor_msg[256] +-- +2.40.1 + diff --git a/dev-python/tables/files/tables-3.8.0-optional-cpuinfo.patch b/dev-python/tables/files/tables-3.8.0-optional-cpuinfo.patch new file mode 100644 index 000000000000..2843914f4a87 --- /dev/null +++ b/dev-python/tables/files/tables-3.8.0-optional-cpuinfo.patch @@ -0,0 +1,69 @@ +https://github.com/PyTables/PyTables/pull/1013 + +From 9d2487eb53af940de3b5c79200c9f4c2b90f51f2 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Mon, 3 Apr 2023 02:07:47 +0100 +Subject: [PATCH] Handle py-cpuinfo not being installed + +Fallback gracefully if py-cpuinfo isn't installed. We already handle this in +setup.py but we need to avoid calling it in leaf.py too. + +py-cpuinfo isn't available on all platforms and PyTables is needed to run +the test suite for some software, so we need to be able to run PyTables +in places where py-cpuinfo isn't yet ported. + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/tables/leaf.py ++++ b/tables/leaf.py +@@ -4,7 +4,11 @@ import warnings + import math + + import numpy as np +-import cpuinfo ++try: ++ import cpuinfo ++ missing_cpuinfo = False ++except ImportError: ++ missing_cpuinfo = True + + from .flavor import (check_flavor, internal_flavor, toarray, + alias_map as flavor_alias_map) +@@ -336,20 +340,21 @@ class Leaf(Node): + # Use a decent default value for chunksize + chunksize *= 16 + # Now, go explore the L3 size and try to find a smarter chunksize +- cpu_info = cpuinfo.get_cpu_info() +- if 'l3_cache_size' in cpu_info: +- # In general, is a good idea to set the chunksize equal to L3 +- l3_cache_size = cpu_info['l3_cache_size'] +- # cpuinfo sometimes returns cache sizes as strings (like, +- # "4096 KB"), so refuse the temptation to guess and use the +- # value only when it is an actual int. +- # Also, sometimes cpuinfo does not return a correct L3 size; +- # so in general, enforcing L3 > L2 is a good sanity check. +- l2_cache_size = cpu_info.get('l2_cache_size', "Not found") +- if (type(l3_cache_size) is int and +- type(l2_cache_size) is int and +- l3_cache_size > l2_cache_size): +- chunksize = l3_cache_size ++ if not missing_cpuinfo: ++ cpu_info = cpuinfo.get_cpu_info() ++ if 'l3_cache_size' in cpu_info: ++ # In general, is a good idea to set the chunksize equal to L3 ++ l3_cache_size = cpu_info['l3_cache_size'] ++ # cpuinfo sometimes returns cache sizes as strings (like, ++ # "4096 KB"), so refuse the temptation to guess and use the ++ # value only when it is an actual int. ++ # Also, sometimes cpuinfo does not return a correct L3 size; ++ # so in general, enforcing L3 > L2 is a good sanity check. ++ l2_cache_size = cpu_info.get('l2_cache_size', "Not found") ++ if (type(l3_cache_size) is int and ++ type(l2_cache_size) is int and ++ l3_cache_size > l2_cache_size): ++ chunksize = l3_cache_size + # In Blosc2, the chunksize cannot be larger than 2 GB - BLOSC2_MAX_BUFFERSIZE + if chunksize > 2**31 - 32: + chunksize = 2**31 - 32 +-- +2.40.0 + diff --git a/dev-python/tables/metadata.xml b/dev-python/tables/metadata.xml new file mode 100644 index 000000000000..2fea045e5982 --- /dev/null +++ b/dev-python/tables/metadata.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <maintainer type="project"> + <email>sci@gentoo.org</email> + <name>Gentoo Science Project</name> + </maintainer> + <longdescription lang="en"> + PyTables is a hierarchical database package designed to efficently + manage very large amounts of data. PyTables is built on top of the + HDF5 library and the NumPy package. It features an object-oriented + interface that, combined with natural naming and C-code generated + from Pyrex sources, makes it a fast, yet extremely easy to use tool + for interactively save and retrieve large amounts of data. + </longdescription> + <use> + <flag name="cpudetection">Enables runtime CPU detection (useful for bindist, compatibility on other CPUs)</flag> + </use> + <upstream> + <remote-id type="github">PyTables/PyTables</remote-id> + <remote-id type="pypi">tables</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/tables/tables-3.8.0-r3.ebuild b/dev-python/tables/tables-3.8.0-r3.ebuild new file mode 100644 index 000000000000..cdc7b5c4f78c --- /dev/null +++ b/dev-python/tables/tables-3.8.0-r3.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +PYPI_PN="tables" +PYTHON_COMPAT=( python3_{10..11} ) +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 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 ~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:= + 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}] + 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=( + "${FILESDIR}"/${P}-blosc2.patch + "${FILESDIR}"/${P}-optional-cpuinfo.patch + "${FILESDIR}"/${P}-cython3.patch + ) + + export PYTABLES_NO_EMBEDDED_LIBS=1 + export USE_PKGCONFIG=TRUE + + rm -r c-blosc/{blosc,internal-complibs} || die + rm tables/libblosc2.so || die + sed -i -e '/blosc2/d' requirements.txt || die + hprefixify -w '/prefixes =/' setup.py + 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 +} diff --git a/dev-python/tables/tables-3.9.0.ebuild b/dev-python/tables/tables-3.9.0.ebuild new file mode 100644 index 000000000000..ea12b00212a9 --- /dev/null +++ b/dev-python/tables/tables-3.9.0.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..11} ) +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 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~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:= + 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() { + export PYTABLES_NO_EMBEDDED_LIBS=1 + export USE_PKGCONFIG=TRUE + + rm -r c-blosc/{blosc,internal-complibs} || die + sed -i -e '/blosc2/d' requirements.txt || die + hprefixify -w '/prefixes =/' setup.py + distutils-r1_python_prepare_all +} + +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 +} |