diff options
| -rw-r--r-- | meta/recipes-devtools/python/python3-setuptools-scm/0001-respect-GIT_CEILING_DIRECTORIES.patch | 36 | ||||
| -rw-r--r-- | meta/recipes-devtools/python/python3-setuptools-scm_8.0.4.bb | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-setuptools-scm/0001-respect-GIT_CEILING_DIRECTORIES.patch b/meta/recipes-devtools/python/python3-setuptools-scm/0001-respect-GIT_CEILING_DIRECTORIES.patch new file mode 100644 index 0000000000..7d2808cc0c --- /dev/null +++ b/meta/recipes-devtools/python/python3-setuptools-scm/0001-respect-GIT_CEILING_DIRECTORIES.patch | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | From a1cc419a118560d63e1ab8838c256a3622185750 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Etienne Cordonnier <ecordonnier@snap.com> | ||
| 3 | Date: Thu, 13 Feb 2025 15:44:40 +0100 | ||
| 4 | Subject: [PATCH] respect GIT_CEILING_DIRECTORIES | ||
| 5 | |||
| 6 | Fix for https://github.com/pypa/setuptools-scm/issues/1103 | ||
| 7 | |||
| 8 | When searching for the root-directory of the git repository e.g. with git rev-parse --show-toplevel, | ||
| 9 | git stops the search when reaching $GIT_CEILING_DIRECTORIES. By ignoring this variable, the function | ||
| 10 | _git_toplevel can go above the real git repository (e.g. when packaging a tarball without .git repository), | ||
| 11 | and then runs "git archive" on an unrelated git repository. | ||
| 12 | |||
| 13 | Upstream-Status: Pending | ||
| 14 | |||
| 15 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 16 | Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> | ||
| 17 | --- | ||
| 18 | src/setuptools_scm/_run_cmd.py | 2 +- | ||
| 19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 20 | |||
| 21 | diff --git a/src/setuptools_scm/_run_cmd.py b/src/setuptools_scm/_run_cmd.py | ||
| 22 | index f2a8285..7e13d9f 100644 | ||
| 23 | --- a/src/setuptools_scm/_run_cmd.py | ||
| 24 | +++ b/src/setuptools_scm/_run_cmd.py | ||
| 25 | @@ -98,7 +98,7 @@ def no_git_env(env: Mapping[str, str]) -> dict[str, str]: | ||
| 26 | k: v | ||
| 27 | for k, v in env.items() | ||
| 28 | if not k.startswith("GIT_") | ||
| 29 | - or k in ("GIT_EXEC_PATH", "GIT_SSH", "GIT_SSH_COMMAND") | ||
| 30 | + or k in ("GIT_CEILING_DIRECTORIES", "GIT_EXEC_PATH", "GIT_SSH", "GIT_SSH_COMMAND") | ||
| 31 | } | ||
| 32 | |||
| 33 | |||
| 34 | -- | ||
| 35 | 2.43.0 | ||
| 36 | |||
diff --git a/meta/recipes-devtools/python/python3-setuptools-scm_8.0.4.bb b/meta/recipes-devtools/python/python3-setuptools-scm_8.0.4.bb index 64b5050c3b..d5f8358a61 100644 --- a/meta/recipes-devtools/python/python3-setuptools-scm_8.0.4.bb +++ b/meta/recipes-devtools/python/python3-setuptools-scm_8.0.4.bb | |||
| @@ -6,6 +6,7 @@ argument or in a SCM managed file." | |||
| 6 | LICENSE = "MIT" | 6 | LICENSE = "MIT" |
| 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=838c366f69b72c5df05c96dff79b35f2" | 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=838c366f69b72c5df05c96dff79b35f2" |
| 8 | 8 | ||
| 9 | SRC_URI += "file://0001-respect-GIT_CEILING_DIRECTORIES.patch" | ||
| 9 | SRC_URI[sha256sum] = "b5f43ff6800669595193fd09891564ee9d1d7dcb196cab4b2506d53a2e1c95c7" | 10 | SRC_URI[sha256sum] = "b5f43ff6800669595193fd09891564ee9d1d7dcb196cab4b2506d53a2e1c95c7" |
| 10 | 11 | ||
| 11 | inherit pypi python_setuptools_build_meta | 12 | inherit pypi python_setuptools_build_meta |
