[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "transcribe-cpp"
version = "0.1.3"
description = "Python bindings for transcribe.cpp"
readme = "README.md"
# 3.8 is EOL (2024-10); 3.9 is the floor. The binding is ctypes-only, so there
# is no per-version compiled extension — one pure-Python package spans the range.
requires-python = ">=3.9"
license = "MIT"
license-files = ["LICENSE"]
authors = [{ name = "The transcribe.cpp authors" }]
keywords = ["transcription", "speech-to-text", "asr", "ggml", "whisper", "parakeet"]
classifiers = [
  "Development Status :: 1 - Planning",
  "Intended Audience :: Developers",
  "Operating System :: OS Independent",
  "Programming Language :: Python :: 3",
  "Programming Language :: Python :: 3.9",
  "Programming Language :: Python :: 3.10",
  "Programming Language :: Python :: 3.11",
  "Programming Language :: Python :: 3.12",
  "Programming Language :: Python :: 3.13",
  "Topic :: Multimedia :: Sound/Audio :: Speech",
  "Topic :: Scientific/Engineering :: Artificial Intelligence",
]

# The pure-Python API package hard-depends on the default native provider so
# `pip install transcribe-cpp` transcribes out of the box. The `==X.Y.Z.*` pin
# is the pre-1.0 base-version contract enforced at the resolver level (a .postN
# packaging fix still resolves); the import-time version/header-hash check in
# _library.py is the runtime backstop. check_version_sync.py gates this pin
# against include/transcribe.h.
dependencies = ["transcribe-cpp-native==0.1.3.*"]

[project.optional-dependencies]
# Opt-in accelerator providers — ADDITIVE: they install alongside the default
# provider and the best one wins at runtime. Same base-version pin contract
# as the hard dependency (gated by check_version_sync.py).
cu12 = ["transcribe-cpp-native-cu12==0.1.3.*"]
# Test-only deps. Run with: uv run --extra test pytest (from bindings/python).
# numpy is here so the numpy PCM-input tests run in every lane instead of
# silently skipping wherever numpy happens to be absent.
test = ["pytest>=7", "numpy"]

[project.urls]
Homepage = "https://github.com/handy-computer/transcribe.cpp"
Repository = "https://github.com/handy-computer/transcribe.cpp"
Issues = "https://github.com/handy-computer/transcribe.cpp/issues"

[tool.hatch.build.targets.wheel]
packages = ["src/transcribe_cpp"]

[tool.uv]
# Dev/CI environments load a locally built library (TRANSCRIBE_LIBRARY or the
# build-tree fallback) — they must not pull the native provider from an index
# (it isn't published until release, and a prebuilt artifact would shadow the
# library under test). The provably-false marker removes the dependency for uv
# project operations only; pip installs of built distributions keep the pin.
override-dependencies = [
  "transcribe-cpp-native; python_version < '0'",
  "transcribe-cpp-native-cu12; python_version < '0'",
]

[tool.pytest.ini_options]
testpaths = ["tests"]
# 77 is the historical CTest "skipped" code; pytest uses skip markers instead.
addopts = "-ra"
