diff --git a/os/petalinux-custom/project-spec/meta-user/conf/layer.conf b/os/petalinux-custom/project-spec/meta-user/conf/layer.conf index 32e4e814..93322668 100644 --- a/os/petalinux-custom/project-spec/meta-user/conf/layer.conf +++ b/os/petalinux-custom/project-spec/meta-user/conf/layer.conf @@ -11,5 +11,5 @@ BBFILE_PRIORITY_meta-loki-bsp-legacy = "8" LAYERSERIES_COMPAT_meta-loki-bsp-legacy = "langdale" OE_TERMINAL = "screen" -SIGGEN_UNLOCKED_RECIPES += " dropbear tzdata" +SIGGEN_UNLOCKED_RECIPES += " dropbear tzdata python3-setuptools-scm-native" IMAGE_INSTALL:append = " libgpiod-tools nfs-utils git ntp ntpdate ntpq sntp tzdata parted u-boot-tools python-loki-adapter loki-user loki-config loki-update python3-zoneinfo" diff --git a/os/petalinux-custom/project-spec/meta-user/recipes-apps/odin-sequencer/odin-sequencer_0.2.0.bb b/os/petalinux-custom/project-spec/meta-user/recipes-apps/odin-sequencer/odin-sequencer_0.2.0.bb index 86793678..50f16f7d 100644 --- a/os/petalinux-custom/project-spec/meta-user/recipes-apps/odin-sequencer/odin-sequencer_0.2.0.bb +++ b/os/petalinux-custom/project-spec/meta-user/recipes-apps/odin-sequencer/odin-sequencer_0.2.0.bb @@ -4,10 +4,14 @@ SUMMARY = "This is a recipe to build odin-sequencer on PetaLinux" RDEPENDS:${PN} += "odin-control" RDEPENDS:${PN} += "python3-inotify" +DEPENDS += " ${PYTHON_PN}-setuptools-scm-native" +#RRECOMMENDS:${PN} = " odin-sequencer-rpc" + # To build to a tag, update the tag here as well as the commit hash below. # You can fetch the git hash with git ls-remote https://github.com/ refs/tags/ +# If you're not building to a tag, you must still put some version here, in doubt the last tag or 0.0.0 GIT_TAG = "0.2.0" -GIT_HASH = "d413771e5b8422d41a0af3c3e9253427e10223e3" +GIT_HASH = "e0b1b08ea8b4ad306b60c5c9ab837609527bf571" PV = "${GIT_TAG}+git${SRCPV}" @@ -16,15 +20,15 @@ PV = "${GIT_TAG}+git${SRCPV}" # SRCREV must now be the git hash of the target tag since Yocto does not like hanging references. SRCREV = "${GIT_HASH}" -SRC_URI = "git://github.com/stfc-aeg/odin-sequencer.git;protocol=http;branch=master \ - file://odin-sequencer-remove-inotify-setuptools.patch" +SRC_URI = "git://github.com/stfc-aeg/odin-sequencer.git;protocol=http;branch=jupyter_rpc" # This has to be in the format expected in Yocto's license list... LICENSE = "Apachev2" # Get this value by running md5sum on the license file LIC_FILES_CHKSUM = "file://LICENSE;md5=2bd339c7a9cf03feeeee2f768a4eb0ce" -inherit setuptools3 +#inherit setuptools3 +inherit python_poetry_core do_configure:prepend() { bbdebug 2 "Current working directory (pwd):" ${pwd} diff --git a/os/petalinux-custom/project-spec/meta-user/recipes-devtools/python/python3-setuptools-scm/0001-respect-GIT_CEILING_DIRECTORIES.patch b/os/petalinux-custom/project-spec/meta-user/recipes-devtools/python/python3-setuptools-scm/0001-respect-GIT_CEILING_DIRECTORIES.patch new file mode 100644 index 00000000..7d2808cc --- /dev/null +++ b/os/petalinux-custom/project-spec/meta-user/recipes-devtools/python/python3-setuptools-scm/0001-respect-GIT_CEILING_DIRECTORIES.patch @@ -0,0 +1,36 @@ +From a1cc419a118560d63e1ab8838c256a3622185750 Mon Sep 17 00:00:00 2001 +From: Etienne Cordonnier +Date: Thu, 13 Feb 2025 15:44:40 +0100 +Subject: [PATCH] respect GIT_CEILING_DIRECTORIES + +Fix for https://github.com/pypa/setuptools-scm/issues/1103 + +When searching for the root-directory of the git repository e.g. with git rev-parse --show-toplevel, +git stops the search when reaching $GIT_CEILING_DIRECTORIES. By ignoring this variable, the function +_git_toplevel can go above the real git repository (e.g. when packaging a tarball without .git repository), +and then runs "git archive" on an unrelated git repository. + +Upstream-Status: Pending + +Signed-off-by: Ross Burton +Signed-off-by: Etienne Cordonnier +--- + src/setuptools_scm/_run_cmd.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/setuptools_scm/_run_cmd.py b/src/setuptools_scm/_run_cmd.py +index f2a8285..7e13d9f 100644 +--- a/src/setuptools_scm/_run_cmd.py ++++ b/src/setuptools_scm/_run_cmd.py +@@ -98,7 +98,7 @@ def no_git_env(env: Mapping[str, str]) -> dict[str, str]: + k: v + for k, v in env.items() + if not k.startswith("GIT_") +- or k in ("GIT_EXEC_PATH", "GIT_SSH", "GIT_SSH_COMMAND") ++ or k in ("GIT_CEILING_DIRECTORIES", "GIT_EXEC_PATH", "GIT_SSH", "GIT_SSH_COMMAND") + } + + +-- +2.43.0 + diff --git a/os/petalinux-custom/project-spec/meta-user/recipes-devtools/python/python3-setuptools-scm_8.0.4.bb b/os/petalinux-custom/project-spec/meta-user/recipes-devtools/python/python3-setuptools-scm_8.0.4.bb new file mode 100644 index 00000000..d5f8358a --- /dev/null +++ b/os/petalinux-custom/project-spec/meta-user/recipes-devtools/python/python3-setuptools-scm_8.0.4.bb @@ -0,0 +1,32 @@ +SUMMARY = "the blessed package to manage your versions by scm tags" +HOMEPAGE = "https://pypi.org/project/setuptools-scm/" +DESCRIPTION = "setuptools_scm handles managing your Python package \ +versions in SCM metadata instead of declaring them as the version \ +argument or in a SCM managed file." +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=838c366f69b72c5df05c96dff79b35f2" + +SRC_URI += "file://0001-respect-GIT_CEILING_DIRECTORIES.patch" +SRC_URI[sha256sum] = "b5f43ff6800669595193fd09891564ee9d1d7dcb196cab4b2506d53a2e1c95c7" + +inherit pypi python_setuptools_build_meta + +UPSTREAM_CHECK_REGEX = "scm-(?P.*)\.tar" + +DEPENDS += "python3-tomli-native python3-packaging-native python3-typing-extensions-native" + +RDEPENDS:${PN} = "\ + python3-packaging \ + python3-pip \ + python3-pyparsing \ + python3-setuptools \ + python3-tomli \ + python3-typing-extensions \ +" + +RDEPENDS:${PN}:append:class-target = " \ + python3-debugger \ + python3-json \ +" + +BBCLASSEXTEND = "native nativesdk"