public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [OE-core][PATCH 1/4] python3-vcs-versioning: add recipe
@ 2026-04-23 17:12 Trevor Gamblin
  2026-04-23 17:12 ` [OE-core][PATCH 2/4] python3-setuptools-scm: upgrade 9.2.2 -> 10.0.5 Trevor Gamblin
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Trevor Gamblin @ 2026-04-23 17:12 UTC (permalink / raw)
  To: openembedded-core

The setuptools-scm project[1] now ships a second module which can be
used independently of setuptools if desired. This is now a dependency
for setuptools-scm, so add a recipe for it.

Update the maintainers.inc file with the recipe and myself as
maintainer.

[1] https://github.com/pypa/setuptools-scm

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
 meta/conf/distro/include/maintainers.inc      |  1 +
 .../python/python3-vcs-versioning_1.1.1.bb    | 24 +++++++++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-vcs-versioning_1.1.1.bb

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 07e840ac34..9f4ae051da 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -750,6 +750,7 @@ RECIPE_MAINTAINER:pn-python3-unittest-automake-output = "Ross Burton <ross.burto
 RECIPE_MAINTAINER:pn-python3-uritools = "Marta Rybczynska <marta.rybczynska@ygreky.com>"
 RECIPE_MAINTAINER:pn-python3-urllib3 = "Tim Orling <tim.orling@konsulko.com>"
 RECIPE_MAINTAINER:pn-python3-uv-build = "Unassigned <unassigned@yoctoproject.org>"
+RECIPE_MAINTAINER:pn-python3-vcs-versioning = "Trevor Gamblin <tgamblin@baylibre.com>"
 RECIPE_MAINTAINER:pn-python3-vcversioner = "Bruce Ashfield <bruce.ashfield@gmail.com>"
 RECIPE_MAINTAINER:pn-python3-wcwidth = "Tim Orling <tim.orling@konsulko.com>"
 RECIPE_MAINTAINER:pn-python3-webcolors = "Bruce Ashfield <bruce.ashfield@gmail.com>"
diff --git a/meta/recipes-devtools/python/python3-vcs-versioning_1.1.1.bb b/meta/recipes-devtools/python/python3-vcs-versioning_1.1.1.bb
new file mode 100644
index 0000000000..788717de9e
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-vcs-versioning_1.1.1.bb
@@ -0,0 +1,24 @@
+SUMMARY = "the blessed package to manage your versions by vcs metadata"
+HOMEPAGE = "https://pypi.org/project/vcs-versioning/"
+DESCRIPTION = "Core VCS versioning functionality extracted as a standalone \
+library that can be used independently of setuptools."
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c9b06ad2ebd7e2e82d34b3caf353e7d5"
+
+SRC_URI[sha256sum] = "fabd75a3cab7dd8ac02fe24a3a9ba936bf258667b5a62ed468c9a1da0f5775bc"
+
+PYPI_PACKAGE = "vcs_versioning"
+
+inherit pypi python_setuptools_build_meta
+
+DEPENDS += "\
+    python3-packaging-native \
+    python3-typing-extensions-native \
+"
+
+RDEPENDS:${PN} = "\
+    python3-packaging \
+    python3-typing-extensions \
+"
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [OE-core][PATCH 2/4] python3-setuptools-scm: upgrade 9.2.2 -> 10.0.5
  2026-04-23 17:12 [OE-core][PATCH 1/4] python3-vcs-versioning: add recipe Trevor Gamblin
@ 2026-04-23 17:12 ` Trevor Gamblin
  2026-04-24  9:42   ` Mathieu Dubois-Briand
  2026-04-23 17:12 ` [OE-core][PATCH 3/4] maintainers.inc: add self for python3-uv-build Trevor Gamblin
  2026-04-23 17:12 ` [OE-core][PATCH 4/4] python3-vcs-versioning: add ptest Trevor Gamblin
  2 siblings, 1 reply; 5+ messages in thread
From: Trevor Gamblin @ 2026-04-23 17:12 UTC (permalink / raw)
  To: openembedded-core

Changelog: https://github.com/pypa/setuptools-scm/releases

Note that the releases page also includes notes for the vcs-versioning
module, which is published separately (and which setuptools-scm depends
on). The new python3-vcs-versioning recipe is added to dependency lists.
Also rework the DEPENDS list to match the same formatting as RDEPENDS.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
 ...tools-scm_9.2.2.bb => python3-setuptools-scm_10.0.5.bb} | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/python/{python3-setuptools-scm_9.2.2.bb => python3-setuptools-scm_10.0.5.bb} (79%)

diff --git a/meta/recipes-devtools/python/python3-setuptools-scm_9.2.2.bb b/meta/recipes-devtools/python/python3-setuptools-scm_10.0.5.bb
similarity index 79%
rename from meta/recipes-devtools/python/python3-setuptools-scm_9.2.2.bb
rename to meta/recipes-devtools/python/python3-setuptools-scm_10.0.5.bb
index d16d79c79f..3e86c4fd2c 100644
--- a/meta/recipes-devtools/python/python3-setuptools-scm_9.2.2.bb
+++ b/meta/recipes-devtools/python/python3-setuptools-scm_10.0.5.bb
@@ -6,13 +6,16 @@ argument or in a SCM managed file."
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=838c366f69b72c5df05c96dff79b35f2"
 
-SRC_URI[sha256sum] = "1c674ab4665686a0887d7e24c03ab25f24201c213e82ea689d2f3e169ef7ef57"
+SRC_URI[sha256sum] = "bbba8fe754516cdefd017f4456721775e6ef9662bd7887fb52ae26813d4838c3"
 
 PYPI_PACKAGE = "setuptools_scm"
 
 inherit pypi python_setuptools_build_meta
 
-DEPENDS += "python3-packaging-native"
+DEPENDS += "\
+    python3-packaging-native \
+    python3-vcs-versioning-native \
+"
 
 RDEPENDS:${PN} = "\
     python3-packaging \
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [OE-core][PATCH 3/4] maintainers.inc: add self for python3-uv-build
  2026-04-23 17:12 [OE-core][PATCH 1/4] python3-vcs-versioning: add recipe Trevor Gamblin
  2026-04-23 17:12 ` [OE-core][PATCH 2/4] python3-setuptools-scm: upgrade 9.2.2 -> 10.0.5 Trevor Gamblin
@ 2026-04-23 17:12 ` Trevor Gamblin
  2026-04-23 17:12 ` [OE-core][PATCH 4/4] python3-vcs-versioning: add ptest Trevor Gamblin
  2 siblings, 0 replies; 5+ messages in thread
From: Trevor Gamblin @ 2026-04-23 17:12 UTC (permalink / raw)
  To: openembedded-core

It's listed as unmaintained, so fix that.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
 meta/conf/distro/include/maintainers.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 9f4ae051da..f98305e930 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -749,7 +749,7 @@ RECIPE_MAINTAINER:pn-python3-typogrify = "Trevor Gamblin <tgamblin@baylibre.com>
 RECIPE_MAINTAINER:pn-python3-unittest-automake-output = "Ross Burton <ross.burton@arm.com>"
 RECIPE_MAINTAINER:pn-python3-uritools = "Marta Rybczynska <marta.rybczynska@ygreky.com>"
 RECIPE_MAINTAINER:pn-python3-urllib3 = "Tim Orling <tim.orling@konsulko.com>"
-RECIPE_MAINTAINER:pn-python3-uv-build = "Unassigned <unassigned@yoctoproject.org>"
+RECIPE_MAINTAINER:pn-python3-uv-build = "Trevor Gamblin <tgamblin@baylibre.com>"
 RECIPE_MAINTAINER:pn-python3-vcs-versioning = "Trevor Gamblin <tgamblin@baylibre.com>"
 RECIPE_MAINTAINER:pn-python3-vcversioner = "Bruce Ashfield <bruce.ashfield@gmail.com>"
 RECIPE_MAINTAINER:pn-python3-wcwidth = "Tim Orling <tim.orling@konsulko.com>"
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [OE-core][PATCH 4/4] python3-vcs-versioning: add ptest
  2026-04-23 17:12 [OE-core][PATCH 1/4] python3-vcs-versioning: add recipe Trevor Gamblin
  2026-04-23 17:12 ` [OE-core][PATCH 2/4] python3-setuptools-scm: upgrade 9.2.2 -> 10.0.5 Trevor Gamblin
  2026-04-23 17:12 ` [OE-core][PATCH 3/4] maintainers.inc: add self for python3-uv-build Trevor Gamblin
@ 2026-04-23 17:12 ` Trevor Gamblin
  2 siblings, 0 replies; 5+ messages in thread
From: Trevor Gamblin @ 2026-04-23 17:12 UTC (permalink / raw)
  To: openembedded-core

The tests are in the 'testing_vcs' directory, so set PTEST_PYTEST_DIR
accordingly. Add setuptools, setuptools-scm, and git to the ptest
RDEPENDS, since many of the tests make use of them. Many of the skipped
tests depend on mercurial, but that's in meta-oe and not worth moving to
oe-core just for this.

Add python3-vcs-versioning to PTESTS_FAST in ptest-packagelists.inc,
since the suite only takes a few seconds.

We also need a custom run-ptest script for two reasons:

1. There is a 'vcs_versioning.test_api' used as a plugin. This is
   mentioned in conftest.py but is intended to be picked up from
   pyproject.toml, which we don't ship with the ptest image. Instead,
   just add '-p vcs_versioning.test_api' to the pytest call.
2. The test logic tries to rewrite pytest's assertion failures, which
   doesn't work well with our automake formatting. We can work around
   this by telling pytest to output plain messages with --assert=plain.

Example test results:

|============================================================================
|Testsuite summary
|# TOTAL: 409
|# PASS: 364
|# SKIP: 44
|# XFAIL: 1
|# FAIL: 0
|# XPASS: 0
|# ERROR: 0
|DURATION: 3
|END: /usr/lib/python3-vcs-versioning/ptest
|2026-04-23T16:21
|STOP: ptest-runner
|TOTAL: 1 FAIL: 0

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
 .../distro/include/ptest-packagelists.inc     |  1 +
 .../python/python3-vcs-versioning/run-ptest   |  6 ++++++
 .../python/python3-vcs-versioning_1.1.1.bb    | 19 ++++++++++++++++++-
 3 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/python/python3-vcs-versioning/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 11a894accf..d7a529678f 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -87,6 +87,7 @@ PTESTS_FAST = "\
     python3-pyyaml \
     python3-rpds-py \
     python3-trove-classifiers \
+    python3-vcs-versioning \
     python3-uritools \
     python3-wcwidth \
     python3-webcolors \
diff --git a/meta/recipes-devtools/python/python3-vcs-versioning/run-ptest b/meta/recipes-devtools/python/python3-vcs-versioning/run-ptest
new file mode 100644
index 0000000000..6550ec8273
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-vcs-versioning/run-ptest
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# we need to load the vcs_versioning.test_api plugin for some tests to work.
+# Also make sure that we don't get pretty diffs for assertion errors so that we
+# don't see terminalreporter errors (which the automake plugin un-registers).
+pytest -p vcs_versioning.test_api --assert=plain --automake
diff --git a/meta/recipes-devtools/python/python3-vcs-versioning_1.1.1.bb b/meta/recipes-devtools/python/python3-vcs-versioning_1.1.1.bb
index 788717de9e..4d2f5007b4 100644
--- a/meta/recipes-devtools/python/python3-vcs-versioning_1.1.1.bb
+++ b/meta/recipes-devtools/python/python3-vcs-versioning_1.1.1.bb
@@ -7,9 +7,14 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c9b06ad2ebd7e2e82d34b3caf353e7d5"
 
 SRC_URI[sha256sum] = "fabd75a3cab7dd8ac02fe24a3a9ba936bf258667b5a62ed468c9a1da0f5775bc"
 
+SRC_URI += "\
+    file://run-ptest \
+"
+
 PYPI_PACKAGE = "vcs_versioning"
+PTEST_PYTEST_DIR = "testing_vcs"
 
-inherit pypi python_setuptools_build_meta
+inherit pypi python_setuptools_build_meta ptest-python-pytest
 
 DEPENDS += "\
     python3-packaging-native \
@@ -21,4 +26,16 @@ RDEPENDS:${PN} = "\
     python3-typing-extensions \
 "
 
+RDEPENDS:${PN}-ptest += "\
+    git \
+    python3-setuptools \
+    python3-setuptools-scm \
+"
+
+do_install_ptest:append() {
+    rm -rf ${D}${PTEST_PATH}/.pytest_cache
+    find ${D}${PTEST_PATH} -name __pycache__ -type d -exec rm -rf {} +
+    find ${D}${PTEST_PATH} -name '*.pyc' -delete
+}
+
 BBCLASSEXTEND = "native nativesdk"
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [OE-core][PATCH 2/4] python3-setuptools-scm: upgrade 9.2.2 -> 10.0.5
  2026-04-23 17:12 ` [OE-core][PATCH 2/4] python3-setuptools-scm: upgrade 9.2.2 -> 10.0.5 Trevor Gamblin
@ 2026-04-24  9:42   ` Mathieu Dubois-Briand
  0 siblings, 0 replies; 5+ messages in thread
From: Mathieu Dubois-Briand @ 2026-04-24  9:42 UTC (permalink / raw)
  To: Trevor Gamblin, openembedded-core

On Thu Apr 23, 2026 at 7:12 PM CEST, Trevor Gamblin wrote:
> Changelog: https://github.com/pypa/setuptools-scm/releases
>
> Note that the releases page also includes notes for the vcs-versioning
> module, which is published separately (and which setuptools-scm depends
> on). The new python3-vcs-versioning recipe is added to dependency lists.
> Also rework the DEPENDS list to match the same formatting as RDEPENDS.
>
> Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
> ---

Hi Trevor,

Thanks for your patch.

It looks like urllib is not happy about this upgrade:

ERROR: nativesdk-python3-urllib3-2.6.3-r0 do_compile: Execution of '/srv/pokybuild/yocto-worker/buildtools/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-urllib3/2.6.3/temp/run.do_compile.3697461' failed with exit code 1
...
ERROR: Logfile of failure stored in: /srv/pokybuild/yocto-worker/buildtools/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-urllib3/2.6.3/temp/log.do_compile.3697461
Log data follows:
| DEBUG: Executing shell function do_compile
| * Getting build dependencies for wheel...
|
| ERROR Missing dependencies:
| 	setuptools-scm<10,>=8
| WARNING: exit code 1 from a shell command.

https://autobuilder.yoctoproject.org/valkyrie/#/builders/43/builds/3697
https://autobuilder.yoctoproject.org/valkyrie/#/builders/25/builds/3671

This seems to be fixed on the master branch, so either an upgrade of
urllib or a backport should fix it.
https://github.com/urllib3/urllib3/blob/main/pyproject.toml#L4

Can you have a look at it?

Thanks,
Mathieu

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-04-24  9:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23 17:12 [OE-core][PATCH 1/4] python3-vcs-versioning: add recipe Trevor Gamblin
2026-04-23 17:12 ` [OE-core][PATCH 2/4] python3-setuptools-scm: upgrade 9.2.2 -> 10.0.5 Trevor Gamblin
2026-04-24  9:42   ` Mathieu Dubois-Briand
2026-04-23 17:12 ` [OE-core][PATCH 3/4] maintainers.inc: add self for python3-uv-build Trevor Gamblin
2026-04-23 17:12 ` [OE-core][PATCH 4/4] python3-vcs-versioning: add ptest Trevor Gamblin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox