aqt.package#
Helpers for the packaged version of Anki.
Functions#
|
Code run the first time after install/upgrade. |
|
Return the path to the uv binary. |
|
Return the path to the launcher root directory (AnkiProgramFiles). |
|
Return the path to a binary in the launcher's venv. |
|
Add Python requirements to the launcher venv using uv add. |
|
Return the path to the Anki launcher executable. |
|
Create a trigger file to request launcher UI on next run. |
|
Update and restart Anki using the launcher. |
Module Contents#
- aqt.package.first_run_setup() None#
Code run the first time after install/upgrade.
Currently, we just import our main libraries and invoke mpv/lame on macOS, which is slow on the first run, and doing it this way shows progress being made.
- aqt.package.uv_binary() str | None#
Return the path to the uv binary.
- aqt.package.launcher_root() str | None#
Return the path to the launcher root directory (AnkiProgramFiles).
- aqt.package.venv_binary(cmd: str) str | None#
Return the path to a binary in the launcher’s venv.
- aqt.package.add_python_requirements(reqs: list[str]) tuple[bool, str]#
Add Python requirements to the launcher venv using uv add.
Returns (success, output)
- aqt.package.launcher_executable() str | None#
Return the path to the Anki launcher executable.
- aqt.package.trigger_launcher_run() None#
Create a trigger file to request launcher UI on next run.
- aqt.package.update_and_restart() None#
Update and restart Anki using the launcher.