All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-tensorflow][PATCH] tensorflow-lite: pass TF_PYTHON_VERSION to the pip package build
@ 2026-11-27 19:07 Daniel Drake
  0 siblings, 0 replies; only message in thread
From: Daniel Drake @ 2026-11-27 19:07 UTC (permalink / raw)
  To: yocto-patches; +Cc: jiahongxujia, hongxujia83, Daniel Drake

Since openembedded-core moved to Python 3.15, do_compile fails in the
second Bazel run, started by build_pip_package_with_bazel.sh:

  HERMETIC_PYTHON_VERSION variable was not set correctly, using default version.
  Python 3.15 will be used.
  ...
  Error in fail:
  Could not find requirements_lock.txt file matching specified Python version.
  Specified python version: 3.15
  Python versions with available requirement_lock.txt files: 3.10, 3.11, 3.12, 3.13, 3.14

The first Bazel run already sets TF_PYTHON_VERSION=3.14 but the 2nd run
(pip package build) falls back to the python3-native version.

Use ${CUSTOM_BAZEL_FLAGS} to consistently specify Bazel's own Python
3.14 for both runs.

Signed-off-by: Daniel Drake <ddrake@baylibre.com>
---
 recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb b/recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb
index 4951fbc..8e31f16 100644
--- a/recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb
+++ b/recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb
@@ -63,6 +63,7 @@ export CUSTOM_BAZEL_FLAGS = " \
     --crosstool_top=@local_config_yocto_compiler//:toolchain \
     --host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
     --platforms=@local_config_yocto_compiler//:linux_${BAZEL_TARGET_CPU} \
+    --repo_env=TF_PYTHON_VERSION=3.14 \
 "
 
 do_compile () {
@@ -72,7 +73,6 @@ do_compile () {
     ${BAZEL} build \
         ${CUSTOM_BAZEL_FLAGS} \
         --copt -DTF_LITE_DISABLE_X86_NEON --copt -DMESA_EGL_NO_X11_HEADERS \
-        --repo_env=TF_PYTHON_VERSION=3.14 \
         --define tflite_with_xnnpack=false \
         tensorflow/lite:libtensorflowlite.so \
         tensorflow/lite/tools/benchmark:benchmark_model \
-- 
2.56.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-27 19:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 19:07 [meta-tensorflow][PATCH] tensorflow-lite: pass TF_PYTHON_VERSION to the pip package build Daniel Drake

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.