summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-05-27 11:43:36 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-06-24 23:57:42 +0100
commitd841c3524b2b08ad45f74100059ca912205a2ace (patch)
tree9f0341688cd98c2fbfbeb1b59697841df754d575
parent88c069b8bf6431d90910a9c4d8ca91be7b8bcd82 (diff)
downloadpoky-d841c3524b2b08ad45f74100059ca912205a2ace.tar.gz
python3: Remove problematic paths from sysroot files
In the native sysroot we should never have paths to the python3-native build directory. These may or may not exist at the time some dependency is building and nothing should rely upon them. I suspect nothing is relying on this at the moment but clean up just to be sure. The various config copies are adjusted to be modified consistently as some copies were and some were not. The Makefile has the "bad" ${B} paths replaced with a dummy placeholder too. (From OE-Core rev: 2f93d30fee0698e3cf13be17f1691e85d2122b0e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ae9e6249ded8fc063d6333231c391cfa2d594567) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/python/python3_3.10.4.bb10
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/recipes-devtools/python/python3_3.10.4.bb b/meta/recipes-devtools/python/python3_3.10.4.bb
index 2ef320350e..9f1b96b519 100644
--- a/meta/recipes-devtools/python/python3_3.10.4.bb
+++ b/meta/recipes-devtools/python/python3_3.10.4.bb
@@ -165,6 +165,9 @@ do_install:append:class-native() {
165 # tarballs and sysroot creation. 165 # tarballs and sysroot creation.
166 find ${D} -name *.pyc -delete 166 find ${D} -name *.pyc -delete
167 167
168 # Nothing should be looking into ${B} for python3-native
169 sed -i -e 's:${B}:/build/path/unavailable/:g' \
170 ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}*/Makefile
168} 171}
169 172
170do_install:append() { 173do_install:append() {
@@ -175,15 +178,16 @@ do_install:append() {
175 178
176 mkdir -p ${D}${libdir}/python-sysconfigdata 179 mkdir -p ${D}${libdir}/python-sysconfigdata
177 sysconfigfile=`find ${D} -name _sysconfig*.py` 180 sysconfigfile=`find ${D} -name _sysconfig*.py`
178 cp $sysconfigfile ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py
179
180 sed -i \ 181 sed -i \
181 -e "s,^ 'LIBDIR'.*, 'LIBDIR': '${STAGING_LIBDIR}'\,,g" \ 182 -e "s,^ 'LIBDIR'.*, 'LIBDIR': '${STAGING_LIBDIR}'\,,g" \
182 -e "s,^ 'INCLUDEDIR'.*, 'INCLUDEDIR': '${STAGING_INCDIR}'\,,g" \ 183 -e "s,^ 'INCLUDEDIR'.*, 'INCLUDEDIR': '${STAGING_INCDIR}'\,,g" \
183 -e "s,^ 'CONFINCLUDEDIR'.*, 'CONFINCLUDEDIR': '${STAGING_INCDIR}'\,,g" \ 184 -e "s,^ 'CONFINCLUDEDIR'.*, 'CONFINCLUDEDIR': '${STAGING_INCDIR}'\,,g" \
184 -e "/^ 'INCLDIRSTOMAKE'/{N; s,/usr/include,${STAGING_INCDIR},g}" \ 185 -e "/^ 'INCLDIRSTOMAKE'/{N; s,/usr/include,${STAGING_INCDIR},g}" \
185 -e "/^ 'INCLUDEPY'/s,/usr/include,${STAGING_INCDIR},g" \ 186 -e "/^ 'INCLUDEPY'/s,/usr/include,${STAGING_INCDIR},g" \
186 ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py 187 -e "s,${B},/build/path/unavailable/,g" \
188 $sysconfigfile
189 cp $sysconfigfile ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py
190
187 191
188 # Unfortunately the following pyc files are non-deterministc due to 'frozenset' 192 # Unfortunately the following pyc files are non-deterministc due to 'frozenset'
189 # being written without strict ordering, even with PYTHONHASHSEED = 0 193 # being written without strict ordering, even with PYTHONHASHSEED = 0