From: Athanasios Oikonomou <athoik@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Athanasios Oikonomou <athoik@gmail.com>
Subject: [OE-core][PATCH] python: prevent build failure when pycache files missing
Date: Sat, 22 Jan 2022 19:15:46 +0200 [thread overview]
Message-ID: <20220122171546.30099-1-athoik@gmail.com> (raw)
Building a patched version of python3 with byte-code files saved to their legacy locations and names causes the following errors:
| rm: cannot remove '/.../build/tmp/work/x86_64-linux/python3-native/3.9.9-r0/recipe-sysroot-native/usr/lib/python3.9/test/__pycache__/test_range.cpython*': No such file or directory
| rm: cannot remove '/.../build/tmp/work/x86_64-linux/meson-native/0.57.1-r1/recipe-sysroot-native/usr/lib/python*/site-packages/mesonbuild/dependencies/__pycache__/mpi.cpython*': No such file or directory
Force remove pycache files, preventing build failure in case they are absent.
Python3 patched with legacy byte-code locations in order to create a sourceless .pyc deployment for small flash boxes. Unappropriate for upstream.
Signed-off-by: Athanasios Oikonomou <athoik@gmail.com>
---
meta/recipes-devtools/meson/meson.inc | 2 +-
meta/recipes-devtools/python/python3_3.9.9.bb | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc
index e186dede92..bc8ff2bcdc 100644
--- a/meta/recipes-devtools/meson/meson.inc
+++ b/meta/recipes-devtools/meson/meson.inc
@@ -44,5 +44,5 @@ do_install_append () {
# Upstream is discussing ways to solve the issue properly, until then let's
# just not install the problematic files.
# More info: http://benno.id.au/blog/2013/01/15/python-determinism
- rm ${D}${libdir}/python*/site-packages/mesonbuild/dependencies/__pycache__/mpi.cpython*
+ rm -f ${D}${libdir}/python*/site-packages/mesonbuild/dependencies/__pycache__/mpi.cpython*
}
diff --git a/meta/recipes-devtools/python/python3_3.9.9.bb b/meta/recipes-devtools/python/python3_3.9.9.bb
index f41529833c..7d0bef06d5 100644
--- a/meta/recipes-devtools/python/python3_3.9.9.bb
+++ b/meta/recipes-devtools/python/python3_3.9.9.bb
@@ -174,8 +174,8 @@ do_install_append() {
# Upstream is discussing ways to solve the issue properly, until then let's
# just not install the problematic files.
# More info: http://benno.id.au/blog/2013/01/15/python-determinism
- rm ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_range.cpython*
- rm ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_xml_etree.cpython*
+ rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_range.cpython*
+ rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_xml_etree.cpython*
}
do_install_append_class-nativesdk () {
--
2.20.1
next reply other threads:[~2022-01-22 17:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-22 17:15 Athanasios Oikonomou [this message]
2022-01-25 12:15 ` [OE-core][PATCH] python: prevent build failure when pycache files missing Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220122171546.30099-1-athoik@gmail.com \
--to=athoik@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox