]> code.ossystems Code Review - openembedded-core.git/commitdiff
python3-native: correctly invoke regen-importlib make target
authorJoe Slater <joe.slater@windriver.com>
Mon, 23 Apr 2018 17:21:42 +0000 (10:21 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 15 Jun 2018 10:37:46 +0000 (11:37 +0100)
Redefiine regen-all in Makefile to invoke regen-importlib after
building other regen- targets.  Change the recipe to not build it
before regen-all.  This avoids trying to build it multiple times,
which can occasionally fail.

(From OE-Core rev: 72d62c9af07bf34bb8fbb3958742eb592985acc2)

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/recipes-devtools/python/python3-native_3.5.5.bb
meta/recipes-devtools/python/python3/regen-all.patch [new file with mode: 0644]

index 962ccfcc4c577cec1e3daeca07168d20fb4b3f35..3098027d8030651e5647a9bce19f358e738eb52c 100644 (file)
@@ -25,6 +25,7 @@ file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
 file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
 file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
 file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \
+file://regen-all.patch \
 "
 
 SRC_URI[md5sum] = "f3763edf9824d5d3a15f5f646083b6e0"
@@ -62,9 +63,9 @@ do_configure_append() {
 
 # Regenerate all of the generated files
 # This ensures that pgen and friends get created during the compile phase
+#
 do_compile_prepend() {
-    # Has to be done ahead of other regen- targets due to https://bugs.python.org/issue33080
-    oe_runmake regen-importlib
+    # Assuming https://bugs.python.org/issue33080 has been addressed in Makefile.
     oe_runmake regen-all
 }
 
diff --git a/meta/recipes-devtools/python/python3/regen-all.patch b/meta/recipes-devtools/python/python3/regen-all.patch
new file mode 100644 (file)
index 0000000..36b9d9d
--- /dev/null
@@ -0,0 +1,25 @@
+python3-native: run regen-importlib target correctly
+
+regen-importlib depends on other regen- targets, so we must be sure to
+run it after (most of) the others.  In reality, we do not need to run it
+at all since "make" will invoke it, if necessary.  We do not want to
+rely on that, though.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -709,7 +709,8 @@ regen-importlib: Programs/_freeze_import
+ ############################################################################
+ # Regenerate all generated files
+-regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar regen-ast regen-importlib
++regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar regen-ast
++      $(MAKE) regen-importlib
+ ############################################################################
+ # Special rules for object files