From c8cdf1a77c00b9b07ba2fec11def8452fc312212 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Wed, 9 Aug 2023 10:45:40 +0200 Subject: [PATCH] Switch to dynamic version Signed-off-by: Cristian Le --- .git_archival.txt | 3 +++ .gitattributes | 1 + fmf.spec | 2 +- pyproject.toml | 7 +++++-- 4 files changed, 10 insertions(+), 3 deletions(-) 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..7c510094 --- /dev/null +++ b/.git_archival.txt @@ -0,0 +1,3 @@ +node: $Format:%H$ +node-date: $Format:%cI$ +describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..00a7b00c --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.git_archival.txt export-subst diff --git a/fmf.spec b/fmf.spec index 4b1c09e7..f0b9c78f 100644 --- a/fmf.spec +++ b/fmf.spec @@ -1,5 +1,5 @@ Name: fmf -Version: 1.4.1 +Version: 0.0.0 Release: 1%{?dist} Summary: Flexible Metadata Format diff --git a/pyproject.toml b/pyproject.toml index 9ba3621c..5d7141bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ['hatchling'] +requires = ['hatchling', 'hatch-vcs'] build-backend = 'hatchling.build' [project] @@ -23,7 +23,6 @@ classifiers = [ 'Programming Language :: Python :: 3.12', 'Topic :: Utilities', ] -version = '1.4.0' keywords = [ 'metadata', 'testing', @@ -33,6 +32,7 @@ dependencies = [ 'filelock', 'jsonschema', ] +dynamic = ['version'] [project.urls] Homepage = 'https://github.com/teemtee/fmf' @@ -52,6 +52,9 @@ docs = [ [project.scripts] fmf = 'fmf.cli:cli_entry' +[tool.hatch] +version.source = 'vcs' + [tool.hatch.envs.default] platforms = ["linux"]