On Fri, Oct 22, 2021 at 04:09:07PM +0200, Bjorn Ketelaars wrote:
> On Fri 22/10/2021 13:23, Bjorn Ketelaars wrote:
> > On Fri 22/10/2021 09:55, Martin Reindl wrote:
> > > Am 22.10.2021 um 09:49 schrieb Stuart Henderson:
> > > > Only issue in the i386 build was math/py-h5py which specifically wants
> > > > 1.16.5.
> > > >
> > >
> > > Yes, this is one patch which can go away with newer numpy.
> >
> > That is not entirely true. When building, py-h5py checks for a specific
> > version of py-numpy. Diff below fixes this by checking for a minimum
> > version similar to RUN_REQUIRES in setup.py.
> >
> > BTW 'make test' fails because of a py-numpy related issue. This happens
> > with both py-numpy-1.16.5 and py-numpy-1.19.5. Have you seen this
> > before? Both test logs attached.
>
> Correction, failing tests is not because of numpy. It seems it is
> because of py-h5py:
>
> Found a core file in py-h5py's $WRKDIR. Interesting bits:
This one should fly with both old numpy (tested on amd64) and new numpy (tested
on arm64).
Index: Makefile
===================================================================
RCS file: /cvs/ports/math/py-h5py/Makefile,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 Makefile
--- Makefile 24 Jun 2021 10:52:02 -0000 1.7
+++ Makefile 22 Oct 2021 19:31:56 -0000
@@ -2,7 +2,7 @@
COMMENT = pythonic interface to the HDF5 binary data format
-MODPY_EGG_VERSION = 3.3.0
+MODPY_EGG_VERSION = 3.5.0
DISTNAME = h5py-${MODPY_EGG_VERSION}
PKGNAME = py-${DISTNAME}
CATEGORIES = math
@@ -37,7 +37,7 @@ LIB_DEPENDS = math/hdf5
TEST_DEPENDS = devel/py-coveralls${MODPY_FLAVOR} \
devel/py-test-cov${MODPY_FLAVOR}
-do-test:
+do-test: fake
cd ${WRKDIR} && ${MAKE_ENV} PYTHONPATH=${WRKINST}${MODPY_SITEPKG} \
${MODPY_BIN} -c 'import h5py; h5py.run_tests()'
Index: distinfo
===================================================================
RCS file: /cvs/ports/math/py-h5py/distinfo,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 distinfo
--- distinfo 24 Jun 2021 10:52:02 -0000 1.4
+++ distinfo 22 Oct 2021 19:31:56 -0000
@@ -1,2 +1,2 @@
-SHA256 (h5py-3.3.0.tar.gz) = 4NrIh9d5kpd4s8/RMwmpOTWcyedHVvwJr3xSeoJ5cYY=
-SIZE (h5py-3.3.0.tar.gz) = 380221
+SHA256 (h5py-3.5.0.tar.gz) = d8e+QAGsfT7YBHfeW2lCUB14LeG75Ihll73+wqergh8=
+SIZE (h5py-3.5.0.tar.gz) = 384643
Index: patches/patch-h5py_tests_test_file_py
===================================================================
RCS file: patches/patch-h5py_tests_test_file_py
diff -N patches/patch-h5py_tests_test_file_py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-h5py_tests_test_file_py 22 Oct 2021 19:31:56 -0000
@@ -0,0 +1,29 @@
+$OpenBSD$
+
+Index: h5py/tests/test_file.py
+--- h5py/tests/test_file.py.orig
++++ h5py/tests/test_file.py
+@@ -825,6 +825,7 @@ class TestPickle(TestCase):
+ # hence no subclassing TestCase
+ @pytest.mark.mpi
+ class TestMPI(object):
++ @pytest.mark.skip(reason="fixture 'mpi_file_name' not present")
+ def test_mpio(self, mpi_file_name):
+ """ MPIO driver and options """
+ from mpi4py import MPI
+@@ -841,6 +842,7 @@ class TestMPI(object):
+ assert f
+ assert f.driver == 'mpio'
+
++ @pytest.mark.skip(reason="fixture 'mpi_file_name' not present")
+ @pytest.mark.skipif(h5py.version.hdf5_version_tuple < (1, 8, 9),
+ reason="mpio atomic file operations were added in
HDF5 1.8.9+")
+ def test_mpi_atomic(self, mpi_file_name):
+@@ -852,6 +854,7 @@ class TestMPI(object):
+ f.atomic = True
+ assert f.atomic
+
++ @pytest.mark.skip(reason="fixture 'mpi_file_name' not present")
+ def test_close_multiple_mpio_driver(self, mpi_file_name):
+ """ MPIO driver and options """
+ from mpi4py import MPI
Index: patches/patch-lzf_lzf_filter_c
===================================================================
RCS file: patches/patch-lzf_lzf_filter_c
diff -N patches/patch-lzf_lzf_filter_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-lzf_lzf_filter_c 22 Oct 2021 19:31:56 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Fix segfault.
+
+Index: lzf/lzf_filter.c
+--- lzf/lzf_filter.c.orig
++++ lzf/lzf_filter.c
+@@ -249,7 +249,7 @@ size_t lzf_filter(unsigned flags, size_t cd_nelmts,
+
+ if(status != 0){
+
+- free(*buf);
++ H5free_memory(*buf);
+ *buf = outbuf;
+ *buf_size = outbuf_size;
+
Index: patches/patch-setup_py
===================================================================
RCS file: /cvs/ports/math/py-h5py/patches/patch-setup_py,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-setup_py
--- patches/patch-setup_py 24 Jun 2021 10:52:02 -0000 1.2
+++ patches/patch-setup_py 22 Oct 2021 19:31:56 -0000
@@ -5,7 +5,7 @@ Relax Numpy and Python requirements.
Index: setup.py
--- setup.py.orig
+++ setup.py
-@@ -28,8 +28,7 @@ VERSION = '3.3.0'
+@@ -28,8 +28,7 @@ VERSION = '3.5.0'
NUMPY_MIN_VERSIONS = [
# Numpy Python
('1.14.5', "=='3.7'"),
@@ -15,3 +15,12 @@ Index: setup.py
]
# these are required to use h5py
+@@ -49,7 +48,7 @@ SETUP_REQUIRES = [
+ "Cython >=0.29.14; python_version=='3.8'",
+ "Cython >=0.29.15; python_version>='3.9'",
+ ] + [
+- f"numpy =={np_min}; python_version{py_condition}"
++ f"numpy >={np_min}; python_version{py_condition}"
+ for np_min, py_condition in NUMPY_MIN_VERSIONS
+ ]
+
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/math/py-h5py/pkg/PLIST,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 PLIST
--- pkg/PLIST 24 Jun 2021 10:52:02 -0000 1.5
+++ pkg/PLIST 22 Oct 2021 19:31:56 -0000
@@ -1,6 +1,4 @@
@comment $OpenBSD: PLIST,v 1.5 2021/06/24 10:52:02 martin Exp $
-lib/python${MODPY_VERSION}/
-lib/python${MODPY_VERSION}/site-packages/
lib/python${MODPY_VERSION}/site-packages/h5py/
lib/python${MODPY_VERSION}/site-packages/h5py-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/
lib/python${MODPY_VERSION}/site-packages/h5py-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/PKG-INFO