diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2025-07-08 18:09:09 +0200 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2025-07-10 20:23:34 -0400 |
commit | bf0a4396945ced9a88a2dedb4bac10928afcf31c (patch) | |
tree | 09c20bef386a101c75e5d4cce572d3d176706d0d /meta-python/recipes-devtools/python/python3-h5py | |
parent | 3d03058fe2b2eacbd4ebe081032f85063599221c (diff) | |
download | meta-openembedded-bf0a4396945ced9a88a2dedb4bac10928afcf31c.tar.gz |
python3-h5py: backport fixes for incompatible-pointer-types issues
Needed in scarthgap for native build on hosts with gcc-14 and newer.
It was in master since:
https://git.openembedded.org/meta-openembedded/diff/meta-python/recipes-devtools/python/python3-h5py_3.11.0.bb?id=f0c767407d033e3f39ceeccc2f7e03a1ca7a6443
and then removed as fixed in 3.11.0 by:
https://git.openembedded.org/meta-openembedded/commit/?id=4b990b6dbabaeb65df5bf46546a873c69032a040
but scarthgap has older 3.10.0, backport necessary changes.
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-h5py')
2 files changed, 50 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-h5py/0001-Properly-cast-arguments-to-H5Lunpack_elink_val.patch b/meta-python/recipes-devtools/python/python3-h5py/0001-Properly-cast-arguments-to-H5Lunpack_elink_val.patch new file mode 100644 index 0000000000..c39d9b1950 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-h5py/0001-Properly-cast-arguments-to-H5Lunpack_elink_val.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | From 30a59c233fbe149109f378837642dc02b2caf3f5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Orion Poplawski <orion@nwra.com> | ||
3 | Date: Thu, 15 Feb 2024 20:47:50 -0700 | ||
4 | Subject: [PATCH] Properly cast arguments to H5Lunpack_elink_val | ||
5 | |||
6 | Upstream-Status: Backport [https://github.com/h5py/h5py/pull/2380/commits/704e13ac83b42898514610c4df9f32f367e767e4] | ||
7 | |||
8 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
9 | --- | ||
10 | h5py/h5l.pyx | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/h5py/h5l.pyx b/h5py/h5l.pyx | ||
14 | index 60b252f..af725bd 100644 | ||
15 | --- a/h5py/h5l.pyx | ||
16 | +++ b/h5py/h5l.pyx | ||
17 | @@ -184,7 +184,7 @@ cdef class LinkProxy: | ||
18 | if info.type == H5L_TYPE_SOFT: | ||
19 | py_retval = buf | ||
20 | else: | ||
21 | - H5Lunpack_elink_val(buf, buf_size, &wtf, &ext_file_name, &ext_obj_name) | ||
22 | + H5Lunpack_elink_val(buf, buf_size, &wtf, <const char **>&ext_file_name, <const char **>&ext_obj_name) | ||
23 | py_retval = (bytes(ext_file_name), bytes(ext_obj_name)) | ||
24 | finally: | ||
25 | efree(buf) | ||
diff --git a/meta-python/recipes-devtools/python/python3-h5py/0002-Use-libc.stdint-instead-of-numpy.patch b/meta-python/recipes-devtools/python/python3-h5py/0002-Use-libc.stdint-instead-of-numpy.patch new file mode 100644 index 0000000000..35263d8315 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-h5py/0002-Use-libc.stdint-instead-of-numpy.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | From 8b4de2f6946b1c1f68279ecadc05c2817ae82189 Mon Sep 17 00:00:00 2001 | ||
2 | From: Orion Poplawski <orion@nwra.com> | ||
3 | Date: Thu, 22 Feb 2024 08:41:17 -0700 | ||
4 | Subject: [PATCH] Use libc.stdint instead of numpy | ||
5 | |||
6 | Upstream-Status: Backport [https://github.com/h5py/h5py/pull/2382/commits/387a22b8c1513800c0401f496b4ed512c1639798] | ||
7 | |||
8 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
9 | --- | ||
10 | h5py/api_types_ext.pxd | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/h5py/api_types_ext.pxd b/h5py/api_types_ext.pxd | ||
14 | index 91acb12..55a239f 100644 | ||
15 | --- a/h5py/api_types_ext.pxd | ||
16 | +++ b/h5py/api_types_ext.pxd | ||
17 | @@ -20,7 +20,7 @@ from libc.string cimport strlen, strchr, strcpy, strncpy, strcmp,\ | ||
18 | ctypedef long size_t | ||
19 | from libc.time cimport time_t | ||
20 | |||
21 | -from numpy cimport int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t | ||
22 | +from libc.stdint cimport int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t | ||
23 | |||
24 | IF UNAME_SYSNAME != "Windows": | ||
25 | cdef extern from "unistd.h": | ||