Anki/qt/pyproject.toml
Damien Elmes 7ba32cce6d Migrate build system to uv
Closes #3787, and is a step towards #3081 and #4022

This change breaks our PyOxidizer bundling process. While we probably
could update it to work with the new venvs & lockfile, my intention
is to use this as a base to try out a uv-based packager/installer.

Still to do:
- move mpv distribution to a wheel
- build the new uv-based installer.

Some notes about the changes:

- Use uv for python download + venv installation
- Drop python/requirements* in favour of pyproject files / uv.lock
- Bumped to latest Python 3.9 version. The move to 3.13 should be
a fairly trivial change when we're ready.
- Dropped the old write_wheel.py in favour of uv/hatchling. This has
the unfortunate side-effect of dropping leading zeros in our wheels,
which we could try hack around in the future.
- Switch to Qt 6.7 for the dev repo, as it's the first PyQt version
with a Linux/ARM WebEngine wheel.
- Unified our macOS deployment target with minimum required for ARM.
- Dropped unused fluent python files
- Dropped unused python license generation
- Dropped helpers to run under Qt 5, as our wheels were already
requiring Qt 6 to install.
2025-06-16 19:20:12 +07:00

76 lines
1.4 KiB
TOML

[project]
name = "aqt"
dynamic = ["version"]
requires-python = ">=3.9"
license = "AGPL-3.0-or-later"
dependencies = [
"beautifulsoup4==4.12.3", # temporary pin during uv migration
"flask",
"flask_cors",
"jsonschema",
"requests",
"send2trash",
"waitress>=2.0.0",
"psutil; sys.platform == 'win32'",
"pywin32; sys.platform == 'win32'",
"pip-system-certs",
"mock",
"types-decorator",
"types-flask",
"types-flask-cors",
"types-markdown",
"types-waitress",
"types-pywin32",
"pyqt6>=6.2",
"pyqt6-webengine>=6.2",
]
[project.optional-dependencies]
qt66 = [
"pyqt6==6.6.1",
"pyqt6-qt6==6.6.2",
"pyqt6-webengine==6.6.0",
"pyqt6-webengine-qt6==6.6.2",
"pyqt6_sip==13.6.0",
]
qt = [
"pyqt6==6.7.1",
"pyqt6-qt6==6.7.3",
"pyqt6-webengine==6.7.0",
"pyqt6-webengine-qt6==6.7.3",
"pyqt6_sip==13.10.2",
]
qt68 = [
"pyqt6==6.8.0",
"pyqt6-qt6==6.8.1",
"pyqt6-webengine==6.8.0",
"pyqt6-webengine-qt6==6.8.1",
"pyqt6_sip==13.10.2",
]
[tool.uv]
conflicts = [
[
{ extra = "qt" },
{ extra = "qt66" },
{ extra = "qt68" },
],
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project.scripts]
anki = "aqt:run"
[tool.hatch.build.targets.wheel]
packages = ["aqt"]
exclude = ["**/*.scss", "**/*.ui"]
[tool.hatch.version]
source = "code"
path = "../python/version.py"
[tool.hatch.build.hooks.custom]
path = "hatch_build.py"