tflite-micro/python
Ryan Kuester cdf028c7e3
fix(pypi): pass some env v'bles through during containerized whl build (#2258)
Pass a few environmental variables into the bazel build and test of the
tflite_micro package whl during the containerized build for PyPI. By default,
bazel cleans the environment.

Recent changes (presumably) to the package wrapt, installed as a dependency of
the package tensorflow, cause the containerized build of the package
tflite_micro for PyPI targeting Python 3.11 to fail. During wrapt's
installation, setuptools calls pathlib to determine the user's home directory.
pathlib tries HOME in the environment, but falls back on reading the Unix
password database for itself if necessary. This fallback is why
non-containerized environments don't exhibit the failure despite bazel cleaning
HOME from the environment. In the PyPI build container, however, the password
database doesn't contain the invoking user, and pathlib's fallback fails.

To fix, set HOME and pass it through to the action environment of the bazel
build and test. Also pass through a couple of other variables which were also
intended to affect the build and test (in minor ways, such as cache location
and cleaning up a warning).

BUG=fixes #2257
2023-10-02 16:42:47 +00:00
..
tests build(bazel): use --std=c++17 by default (#2060) 2023-06-15 20:22:54 +00:00
tflite_micro fix(pypi): pass some env v'bles through during containerized whl build (#2258) 2023-10-02 16:42:47 +00:00
BUILD
py_namespace.bzl feat: build and test a Python distribution package tflite_micro (#2151) 2023-08-01 22:27:53 +00:00
py_pkg_cc_deps.bzl