From c0da18078fe2186741fcd583bbeb157ac4330ad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20H=C3=B6chenberger?= Date: Mon, 11 Dec 2023 13:33:44 +0100 Subject: [PATCH] Add .gitarchival to allow retrieval of version number when installing from a Git archive --- .git_archival.txt | 4 ++++ .gitattributes | 1 + openneuro/__init__.py | 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..8fb235d --- /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 0000000..00a7b00 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.git_archival.txt export-subst diff --git a/openneuro/__init__.py b/openneuro/__init__.py index 0e05d0b..112c6d4 100644 --- a/openneuro/__init__.py +++ b/openneuro/__init__.py @@ -4,6 +4,6 @@ __version__ = metadata.version("openneuro-py") except metadata.PackageNotFoundError: # package is not installed - pass + __version__ = "0.0.0" from ._download import download, login # noqa: F401