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
+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: