From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Brandon Maier via buildroot <buildroot@buildroot.org>
Cc: Brandon Maier <brandon.maier@collins.com>,
Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
Subject: Re: [Buildroot] [PATCH v2 2/3] utils/check-package: add inline script requirements
Date: Sat, 26 Oct 2024 13:41:09 +0200 [thread overview]
Message-ID: <20241026134109.2a7cfda5@windsurf> (raw)
In-Reply-To: <20241009-check-package-requirements-v2-2-df3e7b79788b@collins.com>
On Wed, 09 Oct 2024 14:14:57 +0000
Brandon Maier via buildroot <buildroot@buildroot.org> wrote:
> The check-package tool requires some PyPi package to be installed before
> it can run. This is typically done by manually installing them into the
> user's global Python environment or setting up a virtual environment,
> then manually installing each dependency.
>
> Python recently defined a format for managing script dependencies as
> inline metadata[1]. This can be used with the `uv` tool to run a Python
> script and automatically install the minimum required version of Python
> and PyPi dependencies.
>
> With this change, it's now possible to run check-package with
>
> uv run -s ./utils/check-package
>
> Note that, because check-package does not have the '.py' file extension
> we must specify the `-s` or `--script` argument. That argument was added
> very recently in release 0.4.19[2].
>
> I set the minimum python to 3.9 as that is the oldest version still
> supported[3]. I verified 3.9 works by running
>
> uv run -p 3.9 -s ./utils/check-package `git ls-tree -r --name-only HEAD` --ignore-list=.checkpackageignore
>
> [1] https://packaging.python.org/en/latest/specifications/inline-script-metadata/#script-type
> [2] https://github.com/astral-sh/uv/releases/tag/0.4.19
> [3] https://devguide.python.org/versions/
>
> Signed-off-by: Brandon Maier <brandon.maier@collins.com>
> ---
> Changes in v2:
> - fix utils/check-package to use Python v3.9 [Arnout]
> ---
> utils/check-package | 7 +++++++
> 1 file changed, 7 insertions(+)
In fact, I had applied an earlier version, but I fixed the 3.8 -> 3.9
issue.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-10-26 11:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 14:14 [Buildroot] [PATCH v2 0/3] utils/check-package: make check-package easier to run Brandon Maier via buildroot
2024-10-09 14:14 ` [Buildroot] [PATCH v2 1/3] docs/manual/adding-packages-tips: mention check-package requirements Brandon Maier via buildroot
2024-10-26 11:40 ` Thomas Petazzoni via buildroot
2024-11-11 10:31 ` Peter Korsgaard
2024-10-09 14:14 ` [Buildroot] [PATCH v2 2/3] utils/check-package: add inline script requirements Brandon Maier via buildroot
2024-10-26 11:41 ` Thomas Petazzoni via buildroot [this message]
2024-11-11 10:31 ` Peter Korsgaard
2024-10-09 14:14 ` [Buildroot] [PATCH v2 3/3] docs/manual/adding-packages-tips: mention uv Brandon Maier via buildroot
2024-10-26 11:44 ` Thomas Petazzoni via buildroot
2024-10-28 13:53 ` Brandon Maier via buildroot
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=20241026134109.2a7cfda5@windsurf \
--to=buildroot@buildroot.org \
--cc=brandon.maier@collins.com \
--cc=ricardo.martincoski@datacom.com.br \
--cc=thomas.petazzoni@bootlin.com \
/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