From 0fdec89efa87be6f805ea17dc9e0ddb79792b755 Mon Sep 17 00:00:00 2001 From: Peter Heatwole Date: Sat, 9 Jul 2022 15:55:00 -0700 Subject: [PATCH] Configure git-archive for setuptools_scm Trying to install zipped archives from Github would fail because `_version.py` does not exist, but git>=2.35 and setuptools_scm>=7 can store the version in `.git_archival.txt` upon creating the archive. --- .git_archival.txt | 4 ++++ .gitattributes | 1 + pyproject.toml | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) 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 0000000..37d637d --- /dev/null +++ b/.git_archival.txt @@ -0,0 +1,4 @@ +node: $Format:%H$ +node-date: $Format:%cI$ +describe-name: $Format:%(describe)$ +ref-names: $Format:%D$ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..a94cb2f --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.git_archival.txt export-subst diff --git a/pyproject.toml b/pyproject.toml index 1373a0f..f841abb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=51", "setuptools_scm>=6.2"] +requires = ["setuptools>=51", "setuptools_scm>=7"] build-backend = "setuptools.build_meta" [tool.isort]