summaryrefslogtreecommitdiff
path: root/dev-python/h5py
diff options
context:
space:
mode:
authorPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
committerPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
commitecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch)
treeb89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/h5py
parent1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff)
downloadbaldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip
Updating liguros repo
Diffstat (limited to 'dev-python/h5py')
-rw-r--r--dev-python/h5py/Manifest1
-rw-r--r--dev-python/h5py/files/h5py-2.10.0-tests.patch32
-rw-r--r--dev-python/h5py/h5py-2.10.0-r1.ebuild67
-rw-r--r--dev-python/h5py/h5py-2.10.0.ebuild63
-rw-r--r--dev-python/h5py/metadata.xml26
5 files changed, 189 insertions, 0 deletions
diff --git a/dev-python/h5py/Manifest b/dev-python/h5py/Manifest
new file mode 100644
index 000000000000..3afb3c69df07
--- /dev/null
+++ b/dev-python/h5py/Manifest
@@ -0,0 +1 @@
+DIST h5py-2.10.0.tar.gz 301057 BLAKE2B 2e9da02224493b79b2df75ff9aa5cb16ab668d07bb95066356749be09091c54032efb3db8b53bdf0fbbbac2bcde532f9f051627327dcf3f35fb578b701ecc165 SHA512 c49b04f7dcddf03f36d4f063d79ecbe544e0b1daee432d4a76cfa83dac3a1f2cb144f40a74fb85ea17cb5b778f57f709969ea5d1a2afc5bdd5aecbc9d732898d
diff --git a/dev-python/h5py/files/h5py-2.10.0-tests.patch b/dev-python/h5py/files/h5py-2.10.0-tests.patch
new file mode 100644
index 000000000000..9f810ed46f01
--- /dev/null
+++ b/dev-python/h5py/files/h5py-2.10.0-tests.patch
@@ -0,0 +1,32 @@
+These tests fail as confirmed by upstream.
+
+Reference: https://github.com/h5py/h5py/issues/1291
+Reference: https://github.com/gentoo/gentoo/pull/14343
+
+diff --git a/h5py/tests/test_file2.py b/h5py/tests/test_file2.py
+index 0fbf2d5..a7a28bb 100644
+--- a/h5py/tests/test_file2.py
++++ b/h5py/tests/test_file2.py
+@@ -207,22 +207,6 @@ class TestFileObj(TestCase):
+ f.create_dataset('test', data=list(range(12)))
+ self.assertRaises(Exception, list, f['test'])
+
+- def test_exception_write(self):
+-
+- class BrokenBytesIO(io.BytesIO):
+- def write(self, b):
+- raise Exception('I am broken')
+-
+- f = h5py.File(BrokenBytesIO(), 'w')
+- self.assertRaises(Exception, f.create_dataset, 'test',
+- data=list(range(12)))
+- self.assertRaises(Exception, f.close)
+-
+- def test_exception_close(self):
+- fileobj = io.BytesIO()
+- f = h5py.File(fileobj, 'w')
+- fileobj.close()
+- self.assertRaises(Exception, f.close)
+
+ def test_method_vanish(self):
+ fileobj = io.BytesIO()
diff --git a/dev-python/h5py/h5py-2.10.0-r1.ebuild b/dev-python/h5py/h5py-2.10.0-r1.ebuild
new file mode 100644
index 000000000000..4196ed179b15
--- /dev/null
+++ b/dev-python/h5py/h5py-2.10.0-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+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"
+
+# disable mpi until mpi4py gets python3_8
+#IUSE="examples mpi"
+IUSE="examples"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+
+#RDEPEND="sci-libs/hdf5:=[mpi=,hl(+)]
+RDEPEND="sci-libs/hdf5:=[hl(+)]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]"
+
+BDEPEND="dev-python/pkgconfig[${PYTHON_USEDEP}]"
+# mpi? ( virtual/mpi )
+
+DEPEND="dev-python/cython[${PYTHON_USEDEP}]
+ doc? ( dev-python/alabaster[${PYTHON_USEDEP}] )
+ test? ( dev-python/QtPy[testlib,${PYTHON_USEDEP}]
+ dev-python/cached-property[${PYTHON_USEDEP}] )"
+# mpi? ( dev-python/mpi4py[${PYTHON_USEDEP}] )
+
+PATCHES="${FILESDIR}/${P}-tests.patch"
+
+DOCS=( README.rst AUTHORS ANN.rst )
+
+distutils_enable_tests setup.py
+distutils_enable_sphinx docs --no-autodoc
+
+#pkg_setup() {
+# use mpi && export CC=mpicc
+#}
+
+python_prepare_all() {
+ append-cflags -fno-strict-aliasing
+ distutils-r1_python_prepare_all
+}
+
+python_configure() {
+# esetup.py configure $(usex mpi --mpi '')
+ esetup.py configure
+}
+
+python_test() {
+ esetup.py test || die "Tests fail with ${EPYTHON}"
+ # tests generate .pytest_cache which should not be installed
+ rm -r "${BUILD_DIR}/lib/.pytest_cache" || die
+}
+
+python_install_all() {
+ use examples && dodoc -r examples
+
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/h5py/h5py-2.10.0.ebuild b/dev-python/h5py/h5py-2.10.0.ebuild
new file mode 100644
index 000000000000..d524e809356c
--- /dev/null
+++ b/dev-python/h5py/h5py-2.10.0.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7} )
+
+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"
+
+IUSE="examples mpi"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="sci-libs/hdf5:=[mpi=,hl(+)]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]"
+
+BDEPEND="dev-python/pkgconfig
+ mpi? ( virtual/mpi )"
+
+DEPEND="dev-python/cython[${PYTHON_USEDEP}]
+ mpi? ( dev-python/mpi4py[${PYTHON_USEDEP}] )
+ doc? ( dev-python/alabaster[${PYTHON_USEDEP}] )
+ test? ( dev-python/QtPy[testlib,${PYTHON_USEDEP}]
+ dev-python/cached-property[${PYTHON_USEDEP}] )"
+
+PATCHES="${FILESDIR}/${P}-tests.patch"
+
+DOCS=( README.rst AUTHORS ANN.rst )
+
+distutils_enable_tests setup.py
+distutils_enable_sphinx docs --no-autodoc
+
+pkg_setup() {
+ use mpi && export CC=mpicc
+}
+
+python_prepare_all() {
+ append-cflags -fno-strict-aliasing
+ distutils-r1_python_prepare_all
+}
+
+python_configure() {
+ esetup.py configure $(usex mpi --mpi '')
+}
+
+python_test() {
+ esetup.py test || die "Tests fail with ${EPYTHON}"
+ # tests generate .pytest_cache which should not be installed
+ rm -r "${BUILD_DIR}/lib/.pytest_cache" || die
+}
+
+python_install_all() {
+ use examples && dodoc -r examples
+
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/h5py/metadata.xml b/dev-python/h5py/metadata.xml
new file mode 100644
index 000000000000..ed09fc30cfc6
--- /dev/null
+++ b/dev-python/h5py/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://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">
+ HDF5 for Python (h5py) is a general-purpose simple Python interface to the
+ Hierarchical Data Format library, version 5. Existing Python and
+ Numpy concepts are used for the interface. Almost all HDF5 features
+ are available from Python, including things like compound datatypes
+ (as used with Numpy recarray types), HDF5 attributes, hyperslab and
+ point-based I/O, and more recent features in HDF 1.8 like resizable
+ datasets and recursive iteration over entire files.
+</longdescription>
+ <upstream>
+ <remote-id type="google-code">h5py</remote-id>
+ <remote-id type="pypi">h5py</remote-id>
+ </upstream>
+ <origin>gentoo-staging</origin>
+</pkgmetadata>