Version numbering from git tags.

This commit is contained in:
2026-05-14 04:34:19 +00:00
parent 5063bbc8c8
commit 024ab84f9e
3 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "mediahive-frontend",
"version": "1.0.0",
"version": "0.0.0",
"description": "Netflix-style media streaming for your collection",
"type": "module",
"scripts": {
+6 -2
View File
@@ -1,6 +1,6 @@
[project]
name = "mediahive"
version = "0.1.0"
dynamic = ["version"]
description = "MediaHive - Media scanning, indexing, and Netflix-style streaming"
readme = "README.md"
requires-python = ">=3.14"
@@ -21,9 +21,12 @@ dependencies = [
mediahive = "mediahive.__main__:main"
[build-system]
requires = ["hatchling"]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build]
packages = ["mediahive"]
artifacts = ["mediahive/frontend-build"]
@@ -48,4 +51,5 @@ gui = [
[dependency-groups]
dev = [
"httpx>=0.28.1",
"setuptools-scm>=8",
]
+5 -6
View File
@@ -17,11 +17,12 @@ import io
import shutil
import subprocess
import sys
import tomllib
import urllib.request
import zipfile
from pathlib import Path
import setuptools_scm
# BtbN automated builds always publish a 'latest' tag with this asset.
_FFMPEG_URL = (
"https://github.com/BtbN/ffmpeg-builds/releases/download/latest"
@@ -57,11 +58,9 @@ def fetch_ffmpeg() -> Path:
def read_version() -> str:
"""Read version from pyproject.toml."""
pyproject = Path(__file__).parent.parent / "pyproject.toml"
with open(pyproject, "rb") as f:
data = tomllib.load(f)
return data["project"]["version"]
"""Read version via setuptools_scm (same logic as hatch-vcs)."""
repo_root = Path(__file__).parent.parent
return setuptools_scm.get_version(root=str(repo_root))
def build_wheel() -> None: