summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-03-06 19:18:53 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-08 18:12:38 +0000
commit94a024dd22e2f30c0d8069802297c0efeb0cdf3a (patch)
tree3a8d0fe87cde20c0462d603c8642befab2ebd183 /meta
parent90983190dfdf7b87dd7f6533c113fc4e5da9854f (diff)
downloadopenembedded-core-contrib-94a024dd22e2f30c0d8069802297c0efeb0cdf3a.tar.gz
python3-cython: Check for files before editing
If using debug-without-src policy then usr/src/debug won't exist, therefore the function will fail due to missing files, adding a check for files to exist before editing them fixes it. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/python/python3-cython_0.29.22.bb9
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/recipes-devtools/python/python3-cython_0.29.22.bb b/meta/recipes-devtools/python/python3-cython_0.29.22.bb
index 01f716c16f..2ec4033fa0 100644
--- a/meta/recipes-devtools/python/python3-cython_0.29.22.bb
+++ b/meta/recipes-devtools/python/python3-cython_0.29.22.bb
@@ -20,8 +20,7 @@ do_install_append() {
PACKAGEBUILDPKGD += "cython_fix_sources"
cython_fix_sources () {
- sed -i -e 's#${WORKDIR}#/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}#g' \
- ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Compiler/FlowControl.c \
+ for f in ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Compiler/FlowControl.c \
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Compiler/FusedNode.c \
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Compiler/Scanning.c \
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Compiler/Visitor.c \
@@ -29,5 +28,9 @@ cython_fix_sources () {
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Plex/Scanners.c \
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Runtime/refnanny.c \
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Tempita/_tempita.c \
- ${PKGD}${libdir}/${PYTHON_DIR}/site-packages/Cython*/SOURCES.txt
+ ${PKGD}${libdir}/${PYTHON_DIR}/site-packages/Cython*/SOURCES.txt; do
+ if [ -e $f ]; then
+ sed -i -e 's#${WORKDIR}#/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}#g' $f
+ fi
+ done
}