From: Trevor Gamblin <tgamblin@baylibre.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][PATCH 2/6 v3] python3targetconfig: export _PYTHON_PROJECT_BASE
Date: Fri, 9 Jan 2026 10:06:47 -0500 [thread overview]
Message-ID: <20260109150651.469332-3-tgamblin@baylibre.com> (raw)
In-Reply-To: <20260109150651.469332-1-tgamblin@baylibre.com>
See: https://github.com/python/cpython/commit/2950bc50af8f
As of 3.14.0, Python's sysconfig module looks for _PYTHON_PROJECT_BASE
to be set when cross-compiling, or otherwise it'll find and use the
native interpreter's paths when calling get_path() and filling out
_CONFIG_VARS. Set _PYTHON_PROJECT_BASE to "${B}" in
python3targetconfig's setup_target_config() to help avoid issues with
incorrect paths in rpm and other recipes that depend on this class.
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
meta/classes-recipe/python3targetconfig.bbclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/classes-recipe/python3targetconfig.bbclass b/meta/classes-recipe/python3targetconfig.bbclass
index 08bc619398..2877665737 100644
--- a/meta/classes-recipe/python3targetconfig.bbclass
+++ b/meta/classes-recipe/python3targetconfig.bbclass
@@ -12,6 +12,7 @@ DEPENDS:append = " ${EXTRA_PYTHON_DEPENDS}"
setup_target_config() {
export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"
+ export _PYTHON_PROJECT_BASE="${B}"
export PYTHONPATH=${STAGING_LIBDIR}/python-sysconfigdata:$PYTHONPATH
export PATH=${STAGING_EXECPREFIXDIR}/python-target-config/:$PATH
}
--
2.52.0
next prev parent reply other threads:[~2026-01-09 15:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 15:06 [OE-core][PATCH 0/6 v3] python3: upgrade 3.13.11 -> 3.14.2 Trevor Gamblin
2026-01-09 15:06 ` [OE-core][PATCH 1/6 v3] python3: upgrade 3.13.11 -> 3.14.0 Trevor Gamblin
2026-01-09 15:06 ` Trevor Gamblin [this message]
2026-01-09 15:06 ` [OE-core][PATCH 3/6 v3] python_pep517: add --prefix to nativepython3 call Trevor Gamblin
2026-01-09 15:06 ` [OE-core][PATCH 4/6 v3] python3: upgrade 3.14.0 -> 3.14.2 Trevor Gamblin
2026-01-09 15:06 ` [OE-core][PATCH 5/6 v3] python3: add _py_warnings, annotationlib to core Trevor Gamblin
2026-01-09 15:06 ` [OE-core][PATCH 6/6 v3] python3: add _ast_unparse " Trevor Gamblin
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=20260109150651.469332-3-tgamblin@baylibre.com \
--to=tgamblin@baylibre.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