From 339c31aac081e8652413949885fb2dd13b937957 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 28 Dec 2024 15:30:23 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=93=A6=20Enable=20support=20for=20ver?= =?UTF-8?q?sioning=20Git=20archives?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's a follow-up to #735 that lacks this property. It's also an internal change. It essentially allows one to ``` $ pip install https://github.com/antonbabenko/pre-commit-terraform/archive/ae5057d.zip ``` and get a correctly computed version in the installed metadata. [1]: https://setuptools-scm.rtfd.io/en/latest/usage/#git-archives --- .git_archival.txt | 3 +++ .gitattributes | 1 + 2 files changed, 4 insertions(+) create mode 100644 .git_archival.txt create mode 100644 .gitattributes diff --git a/.git_archival.txt b/.git_archival.txt new file mode 100644 index 000000000..3e26627d4 --- /dev/null +++ b/.git_archival.txt @@ -0,0 +1,3 @@ +node: $Format:%H$ +node-date: $Format:%cI$ +describe-name: $Format:%(describe:tags=true)$ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..00a7b00c9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.git_archival.txt export-subst From 8d8350ee83629e16d1e44255f770cdea29cc3d8c Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 28 Dec 2024 16:21:07 +0100 Subject: [PATCH 2/2] debug! set root to `.` --- hatch.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hatch.toml b/hatch.toml index dca8f8565..04606579a 100644 --- a/hatch.toml +++ b/hatch.toml @@ -17,3 +17,6 @@ packages = [ [version] source = 'vcs' + +[version.raw-options] +root = '.'