Skip to content

Commit b13eda1

Browse files
committed
[REL] Add git archival support for setuptools-scm (#1609)
* Add git archival support * Add a comment about export-subst (cherry picked from commit 3e022ad)
1 parent 721fb62 commit b13eda1

File tree

7 files changed

+17
-2
lines changed

7 files changed

+17
-2
lines changed

.git_archival.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node: $Format:%H$
2+
node-date: $Format:%cI$
3+
ref-names: $Format:%D$

.gitattributes

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
cuda/_version.py export-subst
2-
31
* text eol=lf
42

53
# we do not own any headers checked in, don't touch them
64
*.h binary
75
*.hpp binary
86
# git should not convert line endings in PNG files
97
*.png binary
8+
*.svg binary
9+
# SCM syntax highlighting & preventing 3-way merges
10+
pixi.lock merge=binary linguist-language=YAML linguist-generated=true
11+
12+
# "export-subst" specifies that this file will get filled in with the current
13+
# commit and tag information when running `git archive`. This allows
14+
# `setuptools-scm` to correctly determine the version when building from a git
15+
# archive. See #1609.
16+
.git_archival.txt export-subst

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ repos:
3131
language: python
3232
additional_dependencies:
3333
- https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl
34+
exclude: '(.*pixi\.lock)|(\.git_archival\.txt)'
3435

3536
- repo: https://github.com/PyCQA/bandit
3637
rev: 2d0b675b04c80ae42277e10500db06a0a37bae17 # frozen: 1.8.6

cuda_bindings/.git_archival.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../.git_archival.txt

cuda_core/.git_archival.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../.git_archival.txt

cuda_pathfinder/.git_archival.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../.git_archival.txt
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../.git_archival.txt

0 commit comments

Comments
 (0)