Files
interpreter/pyproject.toml
2026-01-08 22:07:58 -08:00

99 lines
2.8 KiB
TOML

[project]
name = "interpreter-v2"
version = "2.14.0"
description = "Offline screen translator for Japanese retro games"
readme = "README.md"
requires-python = ">=3.11,<3.13"
license = "MIT"
authors = [
{ name = "qube" }
]
keywords = ["ocr", "translation", "japanese", "games", "retro"]
dependencies = [
# OCR
"meikiocr",
"onnxruntime",
# Translation (Sugoi V4)
"ctranslate2",
"sentencepiece",
# Image processing
"Pillow>=10.0.0",
"numpy",
"opencv-python",
# Screen capture
"mss>=9.0.0",
# Configuration
"PyYAML>=6.0",
# Model download
"requests",
"tqdm",
# Logging
"structlog>=24.0.0",
# macOS only - window capture
"pyobjc-framework-Quartz>=10.0; sys_platform == 'darwin'",
# Windows only - window capture
"pygetwindow>=0.0.9; sys_platform == 'win32'",
# Fork with HWND support for reliable capture with dynamic window titles
"windows-capture-interpreter>=1.5.1; sys_platform == 'win32'",
# Linux only - window capture (X11)
"python-xlib>=0.33; sys_platform == 'linux'",
# Linux only - window capture (Wayland via PipeWire portal)
"dbus-python>=1.3.2; sys_platform == 'linux'",
"PyGObject>=3.42.0; sys_platform == 'linux'",
# GPU acceleration (CUDA 12) - Windows and Linux
"nvidia-cublas-cu12; sys_platform == 'win32' or sys_platform == 'linux'",
"nvidia-cudnn-cu12; sys_platform == 'win32' or sys_platform == 'linux'",
# GUI
"PySide6>=6.6.0",
# Global hotkeys (macOS/Windows use pynput, Linux uses evdev directly)
"pynput>=1.7.0; sys_platform == 'darwin' or sys_platform == 'win32'",
"pyobjc-framework-cocoa>=12.1; sys_platform == 'darwin'",
# Linux only - global hotkeys (evdev-binary provides pre-built wheels, no kernel headers needed)
"evdev-binary>=1.9.0; sys_platform == 'linux'",
]
[project.scripts]
interpreter-v2 = "interpreter:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/interpreter"]
[dependency-groups]
dev = [
"ruff>=0.14.10",
]
[tool.ruff]
line-length = 120
target-version = "py311"
src = ["src"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"W", # pycodestyle warnings
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"RUF", # ruff-specific rules
]
ignore = [
"E501", # line too long (handled by formatter)
"RUF001", # ambiguous unicode (intentional Japanese punctuation)
"RUF012", # mutable class attributes (ctypes structures)
"SIM102", # nested if statements (sometimes clearer)
"SIM105", # contextlib.suppress (try/except/pass is clearer)
"SIM108", # ternary operator (multi-line if/else is clearer)
]
[tool.ruff.lint.isort]
known-first-party = ["interpreter"]