diff mbox series

[2/5] python-native: don't cause a full regeneration of the built sources

Message ID 20191125172224.82269-2-alex.kanavin@gmail.com
State New
Headers show
Series None | expand

Commit Message

Alexander Kanavin Nov. 25, 2019, 5:22 p.m. UTC
From: Ross Burton <ross.burton@intel.com>


When cross-compiling Python 2 you need a native pgen binary, but the cross
recipe can't do this on it's own so we build it in python-native and install it.

The rule to build pgen was also causing a complete rebuild of all of the
generated sources, which meant that building Python 2 needs a *host* Python 2.

This can be fixed by simply building pgen, as this is all we need to install.

[ YOCTO #13645 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>

---
 meta/recipes-devtools/python/python-native_2.7.17.bb | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

-- 
2.17.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-devtools/python/python-native_2.7.17.bb b/meta/recipes-devtools/python/python-native_2.7.17.bb
index 936810d9806..98805d998d5 100644
--- a/meta/recipes-devtools/python/python-native_2.7.17.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.17.bb
@@ -35,10 +35,9 @@  do_configure_append() {
 	autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
 }
 
-# Regenerate all of the generated files
-# This ensures that pgen and friends get created during the compile phase
-do_compile_prepend() {
-    oe_runmake regen-all
+# Cross-compiling Python needs a native pgen, build it here for use later.
+do_compile_append() {
+	oe_runmake Parser/pgen
 }
 
 do_install() {