summaryrefslogtreecommitdiff
path: root/dev-python
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-12-05 13:28:02 +0000
committerSam James <sam@gentoo.org>2023-12-05 13:40:55 +0000
commit2fb8858d14adab839c66d7d2aa6ef5246dc8e4af (patch)
tree74507a38837c96e973dce43b393e8a0c364e29d8 /dev-python
parent29cae3c5271e8d00a524258fa7226b6694def2dd (diff)
downloadgentoo-2fb8858d14adab839c66d7d2aa6ef5246dc8e4af.tar.gz
gentoo-2fb8858d14adab839c66d7d2aa6ef5246dc8e4af.tar.bz2
gentoo-2fb8858d14adab839c66d7d2aa6ef5246dc8e4af.zip
dev-python/h5py: backport cython-3 patch
Closes: https://bugs.gentoo.org/898672 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/h5py/Manifest1
-rw-r--r--dev-python/h5py/h5py-3.10.0-r1.ebuild66
2 files changed, 67 insertions, 0 deletions
diff --git a/dev-python/h5py/Manifest b/dev-python/h5py/Manifest
index 5f00a98654e5..9858508408b0 100644
--- a/dev-python/h5py/Manifest
+++ b/dev-python/h5py/Manifest
@@ -1 +1,2 @@
+DIST h5py-3.10.0-cython3.patch.xz 3868 BLAKE2B 3c0d952bdca5307ebf0bf878c26b94d0593bb89ac538a51017fb94e1e488bffc1583dcf4e713005b87d1b5e20d7b73043b24d65404faf60fb69515e598ca2133 SHA512 a0a0e3d1a9bccad1c89aa7efe3ba1e080eb70cae1f42f8de1021c212817970eaaa7070131e8e39859eea3c18d6c1243a17e7f53f2179f34ff6c406b315bab8fa
DIST h5py-3.10.0.tar.gz 403716 BLAKE2B a8e4351a15aee5fe9d23f9c5f9b6ff44e688a391ba17e27338675bde60415c73e3cd97a4a0c05490df849f649d626450d3dbecc9ae6ea3d24d784a0a4aaa1850 SHA512 840d7f2b9b9d5e22e8edae21c84884abec64acdd6c36437a4921ce9dc1b343c55f66f72b699146d71fe55688f6f948787b62335a24906288e9565b2b19b24b01
diff --git a/dev-python/h5py/h5py-3.10.0-r1.ebuild b/dev-python/h5py/h5py-3.10.0-r1.ebuild
new file mode 100644
index 000000000000..9c255e9ce4bb
--- /dev/null
+++ b/dev-python/h5py/h5py-3.10.0-r1.ebuild
@@ -0,0 +1,66 @@
+# 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..12} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Simple Python interface to HDF5 files"
+HOMEPAGE="
+ https://www.h5py.org/
+ https://github.com/h5py/h5py/
+ https://pypi.org/project/h5py/
+"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-3.10.0-cython3.patch.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ~riscv x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
+IUSE="examples"
+
+DEPEND="
+ >=sci-libs/hdf5-1.10.4:=[hl(+)]
+"
+RDEPEND="
+ ${DEPEND}
+ >=dev-python/numpy-1.17.3[${PYTHON_USEDEP}]
+"
+
+BDEPEND="
+ >=dev-python/cython-0.29.31[${PYTHON_USEDEP}]
+ >=dev-python/numpy-1.14.5[${PYTHON_USEDEP}]
+ dev-python/pkgconfig[${PYTHON_USEDEP}]
+ test? (
+ dev-python/QtPy[testlib,${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${WORKDIR}"/${PN}-3.10.0-cython3.patch
+)
+
+distutils_enable_tests pytest
+distutils_enable_sphinx docs \
+ dev-python/alabaster
+
+python_prepare_all() {
+ # avoid pytest-mpi dep, we do not use mpi anyway
+ sed -i -e 's:pytest-mpi::' pytest.ini || die
+ distutils-r1_python_prepare_all
+
+ export H5PY_SETUP_REQUIRES=0
+}
+
+python_test() {
+ cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
+ epytest -m "not mpi"
+}
+
+python_install_all() {
+ use examples && dodoc -r examples
+ distutils-r1_python_install_all
+}