build: set version statically in pyproject.toml

This commit is contained in:
June 2024-06-06 20:23:48 +02:00
parent 5c55bd3e97
commit 89cb3586c2
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0
3 changed files with 2 additions and 7 deletions

View file

@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project] [project]
name = "infra-rebuild" name = "infra-rebuild"
dynamic = ["version"] version = "0.0.1"
description = "A simple NixOS deployment tool using nixos-rebuild internally, but trying to make infrastructure deployment more convenient." description = "A simple NixOS deployment tool using nixos-rebuild internally, but trying to make infrastructure deployment more convenient."
readme = "README.md" readme = "README.md"
requires-python = ">=3.10" requires-python = ">=3.10"
@ -33,9 +33,6 @@ Source = "https://git.hamburg.ccc.de/CCCHH/infra-rebuild"
[project.scripts] [project.scripts]
infra-rebuild = "infra_rebuild.cli:infra_rebuild" infra-rebuild = "infra_rebuild.cli:infra_rebuild"
[tool.hatch.version]
path = "src/infra_rebuild/__about__.py"
[tool.hatch.envs.default] [tool.hatch.envs.default]
dependencies = [ dependencies = [
"coverage[toml]>=6.5", "coverage[toml]>=6.5",

View file

@ -1 +0,0 @@
__version__ = "0.0.1"

View file

@ -1,11 +1,10 @@
import click import click
from infra_rebuild import operations from infra_rebuild import operations
from infra_rebuild.__about__ import __version__
@click.group(context_settings={"help_option_names": ["-h", "--help"]}, invoke_without_command=True) @click.group(context_settings={"help_option_names": ["-h", "--help"]}, invoke_without_command=True)
@click.version_option(version=__version__, prog_name="infra-rebuild") @click.version_option(prog_name="infra-rebuild")
def infra_rebuild(): def infra_rebuild():
pass pass