tensorflow-lite: pass TF_PYTHON_VERSION to the pip package build
PATCH 1/1 tensorflow-lite: pass TF_PYTHON_VERSION to the pip package build
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.
--- recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb +1 -1
@@ -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 \
Signature · 1 line
2.56.1