From cabc0621b3cb4c8ef5872fa3d50bc6d5291f466d Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 2 Feb 2023 06:50:41 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=20Enable=20support=20for=20git=20a?= =?UTF-8?q?rchive=20installs=20(#1095)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch enables the end-users to succeed installing from GitHub source Git archive URLs, letting `setuptools-scm` calculate the distribution version correctly, including the exports of non-tagged commits[1]. [1] https://github.com/pypa/setuptools_scm#git-archives --- .git_archival.txt | 4 ++++ .gitattributes | 5 +++++ 2 files changed, 9 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 00000000..8fb235d7 --- /dev/null +++ b/.git_archival.txt @@ -0,0 +1,4 @@ +node: $Format:%H$ +node-date: $Format:%cI$ +describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ +ref-names: $Format:%D$ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..ec8c3333 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# Force LF line endings for text files +* text=auto eol=lf + +# Needed for setuptools-scm-git-archive +.git_archival.txt export-subst