Anki/pylib/pyproject.toml
Damien Elmes 37fe704326 Tweak protobuf requirements
Motivated by https://forums.ankiweb.net/t/python-anki-sync-server-broken/64069

From https://protobuf.dev/support/cross-version-runtime-guarantee/:
"Python-specific Guarantees
Since the 3.20.0 release, the Protobuf Python generated code became a thin wrapper around an embedded FileDescriptorProto. Because these protos are supported on extremely long timeframes, our usual major version compatibility windows aren’t typically necessary.

Python may break generated code compatibility in specific future major version releases, but it will be coupled with poison pill warnings and errors in advance. As of 6.32.0, all generated code since 3.20.0 will be supported until at least 8.x.y."
2025-07-16 14:15:25 +07:00

30 lines
632 B
TOML

[project]
name = "anki"
dynamic = ["version"]
requires-python = ">=3.9"
license = "AGPL-3.0-or-later"
dependencies = [
"decorator",
"markdown",
"orjson",
"protobuf>=6.0,<8.0",
"requests[socks]",
# remove after we update to min python 3.11+
"typing_extensions",
# platform-specific dependencies
"distro; sys_platform != 'darwin' and sys_platform != 'win32'",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["anki"]
[tool.hatch.version]
source = "code"
path = "../python/version.py"
[tool.hatch.build.hooks.custom]
path = "hatch_build.py"