summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-03-06 18:29:19 +0100
committerMichał Górny <mgorny@gentoo.org>2021-03-06 18:45:56 +0100
commitdf1f8b2a5ec2d4f0d5d8ac8354b13902b1ba39d2 (patch)
treeb0b852c95098284043571fbd021acf4ea121ebb2 /dev-python/h5py
parentdev-python/fqdn: cached-property is needed for py<3.8 only (diff)
downloadgentoo-df1f8b2a5ec2d4f0d5d8ac8354b13902b1ba39d2.tar.gz
gentoo-df1f8b2a5ec2d4f0d5d8ac8354b13902b1ba39d2.tar.bz2
gentoo-df1f8b2a5ec2d4f0d5d8ac8354b13902b1ba39d2.zip
dev-python/h5py: Bump to 3.2.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/h5py')
-rw-r--r--dev-python/h5py/Manifest1
-rw-r--r--dev-python/h5py/h5py-3.2.1.ebuild68
2 files changed, 69 insertions, 0 deletions
diff --git a/dev-python/h5py/Manifest b/dev-python/h5py/Manifest
index 3afb3c69df07..d667919a5763 100644
--- a/dev-python/h5py/Manifest
+++ b/dev-python/h5py/Manifest
@@ -1 +1,2 @@
DIST h5py-2.10.0.tar.gz 301057 BLAKE2B 2e9da02224493b79b2df75ff9aa5cb16ab668d07bb95066356749be09091c54032efb3db8b53bdf0fbbbac2bcde532f9f051627327dcf3f35fb578b701ecc165 SHA512 c49b04f7dcddf03f36d4f063d79ecbe544e0b1daee432d4a76cfa83dac3a1f2cb144f40a74fb85ea17cb5b778f57f709969ea5d1a2afc5bdd5aecbc9d732898d
+DIST h5py-3.2.1.tar.gz 368170 BLAKE2B 2c198d0cfbd988a8531284e16f563ae630afbdd0b32d41ff1b8e33741ac9c678328a07dbb925d67c538100088de9423a45e65c76f3a1daaa0f7b08229916546d SHA512 c98f935f800f340239fdd5132534a3b79995dc952250521f0bd6972a60c34c21bb56d7ca3f1c655ad9d1e47fc5792f434f88a0919ae75bc9102e659bf4f1c284
diff --git a/dev-python/h5py/h5py-3.2.1.ebuild b/dev-python/h5py/h5py-3.2.1.ebuild
new file mode 100644
index 000000000000..df2504fb79d7
--- /dev/null
+++ b/dev-python/h5py/h5py-3.2.1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+
+inherit distutils-r1 flag-o-matic
+
+DESCRIPTION="Simple Python interface to HDF5 files"
+HOMEPAGE="https://www.h5py.org"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+# disable mpi until mpi4py gets python3_8
+#IUSE="examples mpi"
+IUSE="examples"
+
+#RDEPEND="sci-libs/hdf5:=[mpi=,hl(+)]
+DEPEND="sci-libs/hdf5:=[hl(+)]"
+RDEPEND="${DEPEND}
+ $(python_gen_cond_dep '
+ dev-python/cached-property[${PYTHON_USEDEP}]
+ ' python3_7)
+ dev-python/numpy[${PYTHON_USEDEP}]"
+
+BDEPEND="
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pkgconfig[${PYTHON_USEDEP}]
+ test? (
+ dev-python/QtPy[testlib,${PYTHON_USEDEP}]
+ dev-python/cached-property[${PYTHON_USEDEP}]
+ )"
+# mpi? ( virtual/mpi )
+# mpi? ( dev-python/mpi4py[${PYTHON_USEDEP}] )
+
+distutils_enable_tests pytest
+distutils_enable_sphinx docs \
+ dev-python/alabaster
+
+#pkg_setup() {
+# use mpi && export CC=mpicc
+#}
+
+python_prepare_all() {
+ # fix other numpy dep to be >=
+ sed -i -e '/numpy/s:==:>=:' setup.py || die
+ # avoid pytest-mpi dep, we do not use mpi anyway
+ sed -i -e 's:pytest-mpi::' pytest.ini || die
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ cd "${BUILD_DIR}/lib" || die
+ pytest -vv -m "not mpi" ||
+ die "Tests failed with ${EPYTHON}"
+ # tests generate .pytest_cache which should not be installed
+ rm -r .pytest_cache || die
+}
+
+python_install_all() {
+ use examples && dodoc -r examples
+
+ distutils-r1_python_install_all
+}