build: Configure automatic versioning from git tags

- Use setuptools-scm for automatic version detection
- Version now automatically derived from git tags
- No need to manually update version in pyproject.toml
- Added _version.py to .gitignore

This enables automatic patch version bumping through git tags without
manually updating any configuration files.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Simone Scarduzio
2025-09-23 08:35:24 +02:00
parent 02bce80537
commit b788999072
4 changed files with 52 additions and 9 deletions

View File

@@ -1,6 +1,10 @@
[build-system]
requires = ["setuptools>=61.0", "setuptools-scm>=8.0"]
build-backend = "setuptools.build_meta"
[project]
name = "deltaglider"
version = "0.1.0"
dynamic = ["version"]
description = "Store 4TB in 5GB: S3-compatible storage with 99.9% compression for versioned files"
authors = [
{name = "Beshu Tech", email = "info@beshu.tech"},
@@ -74,12 +78,6 @@ dev = [
[project.scripts]
deltaglider = "deltaglider.app.cli.main:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/deltaglider"]
[tool.hatch.build.targets.sdist]
include = [
@@ -111,8 +109,15 @@ dev-dependencies = [
"mypy>=1.13.0",
"boto3-stubs[s3]>=1.35.0",
"types-python-dateutil>=2.9.0",
"setuptools-scm>=8.0.0",
]
[tool.setuptools_scm]
# Automatically determine version from git tags
write_to = "src/deltaglider/_version.py"
version_scheme = "post-release"
local_scheme = "no-local-version"
[tool.ruff]
target-version = "py311"
line-length = 100