Files
mediapreview/pyproject.toml
T
LeoVasanko 49cca4b0c1 Make CLI work without worker extras; add oosetup subcommand
- __main__ is now a self-contained docopt CLI going straight to
  backends.dispatch (no blake3/tracerite needed); 'oosetup' builds and
  starts the bundled OnlyOffice container and prints
  ONLYOFFICE_JWT_SECRET=<token> as its only stdout line
- dispatch: log a plain one-line error for missing-extra ImportErrors
  instead of a traceback
- worker/pool: friendly install hints when the 'worker' extra is missing
- office: fix import on Python 3.11-3.13 without the 'office' extra
  (lazy annotations); setup_docker returns the JWT secret used and
  redacts it from the logged docker command
- add 'mediapreview' console script and docopt-ng dependency
2026-08-11 23:34:27 +00:00

103 lines
1.7 KiB
TOML

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "mediapreview"
version = "0.1.0"
description = "Low-level media preview converters and a worker pool framework"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"docopt-ng>=0.9.0",
"msgspec>=0.19.0",
"pyvips[binary]>=3.1.1",
]
[project.scripts]
mediapreview = "mediapreview.__main__:main"
[project.optional-dependencies]
worker = [
"blake3>=1.0.5",
"tracerite>=2.3.1",
]
pdf = [
"pymupdf>=1.26.3",
]
video = [
"av>=15.0.0",
"numpy>=2.3.2",
]
office = [
"httpx>=0.28.0",
"pyjwt>=2.10.1",
]
standard = [
"mediapreview[worker]",
"mediapreview[pdf]",
"mediapreview[video]",
"mediapreview[office]",
]
dev = [
"pytest>=8.4.1",
"pytest-asyncio>=0.25.0",
"pytest-cov>=6.0.0",
"ruff>=0.8.0",
"mypy>=1.13.0",
]
[tool.hatch.build.targets.wheel]
packages = ["mediapreview"]
[tool.ruff]
target-version = "py311"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"COM812",
"ISC001",
"ANN001",
"ANN002",
"ANN003",
"ANN201",
"ANN202",
"ANN204",
"ANN205",
"BLE001",
"C901",
"CPY",
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D107",
"D200",
"D203",
"D212",
"D213",
"D400",
"D401",
"D413",
"D415",
"E501",
"EM101",
"EM102",
"INP001",
"PLR0911",
"PLR0912",
"PLR0913",
"PLR0915",
"PLR2004",
"PLW0603",
"TRY003",
]
isort.known-first-party = ["mediapreview"]
per-file-ignores."tests/*" = ["S", "ANN", "D", "INP", "PLR2004", "ARG001", "SLF001"]
[tool.pytest.ini_options]
asyncio_mode = "auto"