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>
This commit is contained in:
2025-12-28 19:42:13 -08:00
parent 9b7f2e1d69
commit 07b746144d

View File

@@ -71,6 +71,13 @@ 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