From: Brandon Maier via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: Brandon Maier <brandon.maier@collins.com>,
Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
Subject: [Buildroot] [PATCH] support/testing/infra/builder.py: fix missing $HOME during build
Date: Mon, 13 May 2024 21:30:35 +0000 [thread overview]
Message-ID: <20240513213035.1738493-1-brandon.maier@collins.com> (raw)
When running a test that uses host-python-setuptools using the Buildroot
Docker image, for example running the following command,
> ./utils/docker-run ./support/testing/run-tests -o output -s -k tests.package.test_python_pytest.TestPythonPy3Pytest
The build fails with the following error,
> File "/home/blmaier/buildroot/output/TestPythonPy3Pytest/build/host-python-setuptools-69.2.0/setuptools/_distutils/dist.py", line 354, in _gen_paths
> yield pathlib.Path('~').expanduser() / filename
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/home/blmaier/buildroot/output/TestPythonPy3Pytest/host/lib/python3.11/pathlib.py", line 1385, in expanduser
> raise RuntimeError("Could not determine home directory.")
> RuntimeError: Could not determine home directory.
>
> ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel
Python setuptools is looking for $HOME but failing to find it.
Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
support/testing/infra/builder.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/support/testing/infra/builder.py b/support/testing/infra/builder.py
index a2abb9ed89..295bc7b83d 100644
--- a/support/testing/infra/builder.py
+++ b/support/testing/infra/builder.py
@@ -52,7 +52,10 @@ class Builder(object):
"> end defconfig\n")
self.logfile.flush()
- env = {"PATH": os.environ["PATH"]}
+ env = {
+ "PATH": os.environ["PATH"],
+ "HOME": os.environ["HOME"]
+ }
env.update(make_extra_env)
cmd = ["make",
@@ -79,7 +82,11 @@ class Builder(object):
in the environment that calls make.
e.g. make_extra_env={"BR2_DL_DIR": "/path"}
"""
- env = {"PATH": os.environ["PATH"]}
+ env = {
+ "PATH": os.environ["PATH"],
+ "HOME": os.environ["HOME"]
+ }
+
if "http_proxy" in os.environ:
self.logfile.write("Using system proxy: " +
os.environ["http_proxy"] + "\n")
--
2.45.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
reply other threads:[~2024-05-13 21:30 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=20240513213035.1738493-1-brandon.maier@collins.com \
--to=buildroot@buildroot.org \
--cc=brandon.maier@collins.com \
--cc=ricardo.martincoski@datacom.com.br \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).