From f974b13c77cbcedda0d496e7a9c70db1ab5462c3 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Mon, 5 Oct 2026 08:37:35 +0000 Subject: [PATCH] Add stable .git_archival.txt for setuptools-scm Lets builds from git archive tarballs (e.g. GitHub source downloads) resolve a version. Uses the stable template without ref-names so the archive content does not change as branches move. Fixes #315 Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01NpUZjUtSoEmYnNCipvEdt6 --- .git_archival.txt | 3 +++ .gitattributes | 1 + changelog/315.bugfix.rst | 1 + 3 files changed, 5 insertions(+) create mode 100644 .git_archival.txt create mode 100644 .gitattributes create mode 100644 changelog/315.bugfix.rst diff --git a/.git_archival.txt b/.git_archival.txt new file mode 100644 index 00000000..7c510094 --- /dev/null +++ b/.git_archival.txt @@ -0,0 +1,3 @@ +node: $Format:%H$ +node-date: $Format:%cI$ +describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..00a7b00c --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.git_archival.txt export-subst diff --git a/changelog/315.bugfix.rst b/changelog/315.bugfix.rst new file mode 100644 index 00000000..785db0fb --- /dev/null +++ b/changelog/315.bugfix.rst @@ -0,0 +1 @@ +Source archives created by ``git archive`` (including GitHub's "Source code" downloads) now carry version information, so building pluggy from them no longer fails with a missing version.