Skip to contentSkip to conversation

python3-h5py: Fix TMPDIR references in dbg files

PATCH New Khem Raj 1 participant 2 messages Apr 16, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 python3-h5py: Fix TMPDIR references in dbg files

These are embedded into comments in C source code generated with cython during do_compile.

Fixes

WARNING: python3-h5py-3.8.0-r0 do_package_qa: QA Issue: File /usr/src/debug/python3-h5py/3.8.0-r0/h5py/_conv.c in package python3-h5py-src contains reference to TMPDIR File /usr/src/debug/python3-h5py/3.8.0-r0/h5py/h5fd.c in package python3-h5py-src contains reference to TMPDIR [buildpaths]

---
 .../recipes-devtools/python/python3-h5py_3.8.0.bb      | 10 ++++++++++
 1 file changed, 10 insertions(+)
meta-python/recipes-devtools/python/python3-h5py_3.8.0.bb +10 -0
index 75a41e29dc..3436444695 100644
@@ -21,6 +21,16 @@ DEPENDS = "python3-pkgconfig-native \
            hdf5 \
           "
 
+PACKAGESPLITFUNCS =+ "fix_cythonized_sources"
+
+fix_cythonized_sources() {
+	for f in `grep -l -r -e '\/* Generated by Cython.*/$' ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}`; do
+		if [ -e $f ]; then
+			sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' $f
+		fi
+	done
+}
+
 RDEPENDS:${PN} = "python3-numpy \
                   python3-six \
                   python3-json \
Signature · 1 line
2.40.0
author
#1 lore raw

PATCH 2/2 python3-pandas: Fix TMPDIR references in dbg files

These are embedded into comments in C source code generated with cython during do_compile.

Fixes

WARNING: python3-pandas-1.5.3-r0 do_package_qa: QA Issue: File /usr/src/debug/python3-pandas/1.5.3-r0/pandas/_libs/hashing.c in package python3-pandas-src contains reference to TMPDIR

---
 .../recipes-devtools/python/python3-pandas_1.5.3.bb    | 10 ++++++++++
 1 file changed, 10 insertions(+)
meta-python/recipes-devtools/python/python3-pandas_1.5.3.bb +10 -0
index aa8dfe279d..129c3147cf 100644
@@ -14,6 +14,16 @@ DEPENDS += " \
     ${PYTHON_PN}-numpy-native ${PYTHON_PN}-cython-native \
 "
 
+PACKAGESPLITFUNCS =+ "fix_cythonized_sources"
+
+fix_cythonized_sources() {
+	for f in `grep -l -r -e '\/* Generated by Cython.*/$' ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}`; do
+		if [ -e $f ]; then
+			sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' $f
+		fi
+	done
+}
+
 CFLAGS:append:toolchain-clang = " -Wno-error=deprecated-declarations"
 
 RDEPENDS:${PN} += " \
Signature · 1 line
2.40.0