diff --git a/.git_archival.txt b/.git_archival.txt new file mode 100644 index 0000000000..b651b9d07d --- /dev/null +++ b/.git_archival.txt @@ -0,0 +1,3 @@ +node: $Format:%H$ +node-date: $Format:%cI$ +ref-names: $Format:%D$ diff --git a/.gitattributes b/.gitattributes index f713b27424..222c26f0cf 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,3 @@ -cuda/_version.py export-subst - * text eol=lf *.cmd text eol=crlf @@ -16,3 +14,9 @@ cuda_core/cuda/core/_cpp/*.hpp -binary text diff *.svg binary # SCM syntax highlighting & preventing 3-way merges pixi.lock merge=binary linguist-language=YAML linguist-generated=true + +# "export-subst" specifies that this file will get filled in with the current +# commit and tag information when running `git archive`. This allows +# `setuptools-scm` to correctly determine the version when building from a git +# archive. See #1609. +.git_archival.txt export-subst diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1c4339b948..44ba5d5bf2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: language: python additional_dependencies: - https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl - exclude: '.*pixi\.lock' + exclude: '(.*pixi\.lock)|(\.git_archival\.txt)' args: ["--fix"] - id: no-markdown-in-docs-source diff --git a/cuda_bindings/.git_archival.txt b/cuda_bindings/.git_archival.txt new file mode 120000 index 0000000000..d7a42b253d --- /dev/null +++ b/cuda_bindings/.git_archival.txt @@ -0,0 +1 @@ +../.git_archival.txt \ No newline at end of file diff --git a/cuda_core/.git_archival.txt b/cuda_core/.git_archival.txt new file mode 120000 index 0000000000..d7a42b253d --- /dev/null +++ b/cuda_core/.git_archival.txt @@ -0,0 +1 @@ +../.git_archival.txt \ No newline at end of file diff --git a/cuda_pathfinder/.git_archival.txt b/cuda_pathfinder/.git_archival.txt new file mode 120000 index 0000000000..d7a42b253d --- /dev/null +++ b/cuda_pathfinder/.git_archival.txt @@ -0,0 +1 @@ +../.git_archival.txt \ No newline at end of file diff --git a/cuda_python_test_helpers/.git_archival.txt b/cuda_python_test_helpers/.git_archival.txt new file mode 120000 index 0000000000..d7a42b253d --- /dev/null +++ b/cuda_python_test_helpers/.git_archival.txt @@ -0,0 +1 @@ +../.git_archival.txt \ No newline at end of file