diff mbox series

[2/2] pyproject.toml: add scripts

Message ID 20260812194433.40594-2-chris.laplante@agilent.com
State New
Headers show
Series [1/2] pyproject.toml: add setuptools to requires; fix project structure | expand

Commit Message

chris.laplante@agilent.com Aug. 12, 2026, 7:44 p.m. UTC
From: Chris Laplante <chris.laplante@agilent.com>

This change lets you do, e.g. uv run bitbake

which is convienent for development.

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
---
 pyproject.toml | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Rob Woolley Aug. 13, 2026, 11:45 p.m. UTC | #1
Hi Chris,

I tried out using "uv run bitbake" and get the following message:

ERROR: The BBPATH variable is not set and bitbake did not find a
conf/bblayers.conf file in the expected location.
Maybe you accidentally invoked bitbake from the wrong directory?


I think some of the challenges with packaging bitbake is that the version
is tied to a specific Yocto Project, the sys.path is modified at runtime to
find the lib directory, and that it needs to run in the oe-init-build-env
environment.  This could make it difficult to work in this workflow.

Out of curiosity, were you able to do bitbake builds with this setup?

Regards,
Rob

On Wed, Aug 12, 2026 at 3:44 PM Chris Laplante via lists.openembedded.org
<chris.laplante=agilent.com@lists.openembedded.org> wrote:

> From: Chris Laplante <chris.laplante@agilent.com>
>
> This change lets you do, e.g. uv run bitbake
>
> which is convienent for development.
>
> Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
> ---
>  pyproject.toml | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/pyproject.toml b/pyproject.toml
> index 886753f14..d3555bc42 100644
> --- a/pyproject.toml
> +++ b/pyproject.toml
> @@ -9,6 +9,19 @@ requires-python = ">= 3.9"
>
>  [tool.setuptools]
>  package-dir = {"" = "lib"}
> +script-files = [
> +    "bin/bitbake",
> +    "bin/bitbake-config-build",
> +    "bin/bitbake-diffsigs",
> +    "bin/bitbake-dumpsig",
> +    "bin/bitbake-getvar",
> +    "bin/bitbake-hashclient",
> +    "bin/bitbake-hashserv",
> +    "bin/bitbake-layers",
> +    "bin/bitbake-prserv",
> +    "bin/bitbake-selftest",
> +    "bin/bitbake-setup"
> +]
>
>  [tool.setuptools.packages.find]
>  where = ["lib"]
> --
> 2.43.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#19920):
> https://lists.openembedded.org/g/bitbake-devel/message/19920
> Mute This Topic: https://lists.openembedded.org/mt/120723538/556952
> Group Owner: bitbake-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [
> rob.woolleywr@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
chris.laplante@agilent.com Aug. 14, 2026, 2:44 p.m. UTC | #2
Hi Rob,

> I tried out using "uv run bitbake" and get the following message:
> ERROR: The BBPATH variable is not set and bitbake did not find a
> conf/bblayers.conf file in the expected location.
> Maybe you accidentally invoked bitbake from the wrong directory?
> 
> I think some of the challenges with packaging bitbake is that the version is tied
> to a specific Yocto Project, the sys.path is modified at runtime to find the lib
> directory, and that it needs to run in the oe-init-build-env environment.  This
> could make it difficult to work in this workflow.
> 
> Out of curiosity, were you able to do bitbake builds with this setup?

Alas, you're right. 'uv run bitbake' doesn't work for me either as it turns out :(. 

But 'uv run bitbake-selftest' works, which is very nice. 

That being said, getting rid of the setuptools stuff means we also give up this ability :/. 

Thanks,
Chris
diff mbox series

Patch

diff --git a/pyproject.toml b/pyproject.toml
index 886753f14..d3555bc42 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -9,6 +9,19 @@  requires-python = ">= 3.9"
 
 [tool.setuptools]
 package-dir = {"" = "lib"}
+script-files = [
+    "bin/bitbake",
+    "bin/bitbake-config-build",
+    "bin/bitbake-diffsigs",
+    "bin/bitbake-dumpsig",
+    "bin/bitbake-getvar",
+    "bin/bitbake-hashclient",
+    "bin/bitbake-hashserv",
+    "bin/bitbake-layers",
+    "bin/bitbake-prserv",
+    "bin/bitbake-selftest",
+    "bin/bitbake-setup"
+]
 
 [tool.setuptools.packages.find]
 where = ["lib"]