Files
local-transcription/pyproject.toml
jknapp 07b746144d Properly fix enum34 error with override-dependencies
The previous PyInstaller exclusion approach didn't prevent the pre-flight
check from failing. The proper solution is to use UV's override-dependencies
to prevent enum34 from being installed in the first place.

Changes:
- Added [tool.uv] override-dependencies in pyproject.toml
- Configured enum34 to only install on Python < 3.4
  (effectively never, since we require Python >=3.9)
- This prevents enum34 from being added to uv.lock

Why this works:
- UV respects override-dependencies during dependency resolution
- enum34 is never installed, so PyInstaller pre-flight check passes
- enum is part of Python stdlib since 3.4, so no functionality lost
- RealtimeSTT's dependency on pvporcupine==1.9.5 (which requires enum34)
  is satisfied without actually installing enum34

Credit: Solution suggested by Opus

Resolves: enum34 incompatible with PyInstaller error

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-28 19:42:13 -08:00

89 lines
2.2 KiB
TOML

[project]
name = "local-transcription"
version = "0.1.0"
description = "A standalone desktop application for real-time speech-to-text transcription using Whisper models"
readme = "README.md"
requires-python = ">=3.9"
license = {text = "MIT"}
authors = [
{name = "Your Name", email = "your.email@example.com"}
]
keywords = ["transcription", "speech-to-text", "whisper", "streaming", "obs"]
dependencies = [
"numpy>=1.24.0",
"pyyaml>=6.0",
"sounddevice>=0.4.6",
"scipy>=1.10.0",
"torch>=2.0.0",
"PySide6>=6.6.0",
# RealtimeSTT for advanced VAD-based transcription
"RealtimeSTT>=0.3.0",
# Web server (always-running for OBS integration)
"fastapi>=0.104.0",
"uvicorn>=0.24.0",
"websockets>=12.0",
# Server sync client
"requests>=2.31.0",
]
[project.optional-dependencies]
# Kept for backwards compatibility, but server deps are now in main dependencies
server = [
"fastapi>=0.104.0",
"uvicorn>=0.24.0",
"websockets>=12.0",
"requests>=2.31.0",
]
dev = [
"pytest>=7.4.0",
"black>=23.0.0",
"ruff>=0.1.0",
]
[project.scripts]
local-transcription = "main:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["client", "gui"]
[dependency-groups]
dev = [
"pyinstaller>=6.17.0",
]
# Add PyTorch CUDA index as additional source
# CUDA builds work on both GPU and CPU systems (fallback to CPU if no GPU)
# Using 'explicit = true' means only packages we explicitly specify use this index
[[tool.uv.index]]
name = "pytorch-cu121"
url = "https://download.pytorch.org/whl/cu121"
explicit = true
# Tell uv to get torch, torchvision, and torchaudio from the PyTorch CUDA index
# All other packages come from PyPI
[tool.uv.sources]
torch = { index = "pytorch-cu121" }
torchvision = { index = "pytorch-cu121" }
torchaudio = { index = "pytorch-cu121" }
# Override enum34 dependency to only install on Python < 3.4
# (which effectively never happens since we require Python >= 3.9)
# enum34 is an obsolete backport incompatible with PyInstaller
[tool.uv]
override-dependencies = [
"enum34; python_version < '3.4'"
]
[tool.ruff]
line-length = 100
target-version = "py39"
[tool.black]
line-length = 100
target-version = ["py39"]