All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Drake <ddrake@baylibre.com>
To: yocto-patches@lists.yoctoproject.org
Cc: jiahongxujia@163.com, hongxujia83@gmail.com,
	Daniel Drake <ddrake@baylibre.com>
Subject: [meta-tensorflow][PATCH] tensorflow-lite: pass TF_PYTHON_VERSION to the pip package build
Date: Fri, 27 Nov 2026 19:07:11 +0000	[thread overview]
Message-ID: <20261127190711.316659-1-ddrake@baylibre.com> (raw)

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


                 reply	other threads:[~2026-11-27 19:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261127190711.316659-1-ddrake@baylibre.com \
    --to=ddrake@baylibre.com \
    --cc=hongxujia83@gmail.com \
    --cc=jiahongxujia@163.com \
    --cc=yocto-patches@lists.yoctoproject.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 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.