Configuration
All options go in [tool.appimage] inside pyproject.toml. Every key is optional - omitted keys are resolved automatically from [project] metadata.
Build options
Key |
Default |
Description |
|---|---|---|
|
|
Application name - used as the AppImage filename prefix. |
|
|
Console script entry point launched by default. |
|
|
Python minor version to bundle, e.g. |
|
(latest) |
python-build-standalone release date for reproducible builds (e.g. |
|
|
Extras to install from the current package, e.g. |
|
|
Additional pip install targets beyond the current package. Resolved by whatever pip picks up from the environment - see Private package indexes for pointing this at an internal mirror. |
|
auto-detected, then built-in default |
Path to the icon file, relative to the project root. |
|
auto-detected, then generated |
Path to the |
|
(generated) |
Path to a custom AppRun script. |
|
|
Directory for intermediate artefacts (Python tarball, appimagetool, runtime file). |
|
|
Directory where the finished AppImage is written. |
|
- |
Update information string passed to appimagetool via |
|
- |
Path to a local appimagetool binary. When omitted, the build cache is checked first, then a download - unlike most other resolved paths in this table, |
|
- |
Informational label recording which appimagetool build |
|
- |
Expected sha256 of the appimagetool binary. When set, verified against whichever binary is resolved (explicit path, build cache, or download) - a mismatch aborts the build. A fresh download is auto-verified against GitHub’s published digest even when unset; only a config-path/cache resolution with no pin falls back to an unverified warning logging its actual hash. |
|
- |
Path to a local python-build-standalone tarball. When omitted, the build cache is checked first, then a download. |
|
- |
Expected sha256 of the python-build-standalone tarball. Fresh downloads are already verified against the digest GitHub publishes per release, even without this set; set explicitly to also verify a local |
|
- |
Path to an already-extracted Python distribution directory, copied into |
|
(the running |
Exact version of the bundled |
|
- |
Expected sha256 of the |
|
- |
Expected version of |
|
- |
Path to a local AppImage runtime ELF stub, passed to appimagetool as |
|
- |
Expected sha256 of the runtime file, verified the same way as |
|
- |
Informational label recording which runtime release |
|
|
Abort the build instead of warning whenever appimagetool, the runtime file, or the Python archive would otherwise be used unverified. A fresh download is always auto-verified regardless of any pin - only an explicit config path or an existing build-cache hit with no matching |
|
|
Abort the build instead of warning when |
|
- |
Path to a hash-pinned |
|
|
Abort the build instead of warning when |
|
- |
Path to a hash-pinned pylock-format file constraining the packaged project’s own |
|
|
Abort the build instead of warning when |
|
|
Shortcut for a build that’s reproducible across machines and over time: implies |
Coming from python-appimage or a custom build script
Most of [tool.appimage] never needs to be written by hand when switching from another Python-to-AppImage setup - app, entry_point, python, icon, and desktop are all auto-detected from [project] metadata and standard file locations (see the table above), the same way they would be for a project that never had an AppImage build before.
For example, ssh-mitm used to build its AppImage with a hand-rolled appimage/build.sh (hardcoding a python-build-standalone download URL, an appimagetool download URL, and a pip install invocation) plus a separate appimage/AppRun and appimage/ssh-mitm.desktop. Switching to appimage deleted all three files; the entire addition to pyproject.toml was:
[tool.appimage]
extras = ["production"]
python_date = "20260211"
update_info = "gh-releases-zsync|ssh-mitm|ssh-mitm|latest|ssh-mitm-x86_64.AppImage.zsync"
extrasis whatever[project.optional-dependencies]group the old install command already named.python_dateis optional - only needed to opt into the pinned reproducibility this tool adds that a python-appimage/custom-script setup never had.update_infois often suggested automatically (see the table above) when[project.urls]already points at the project’s GitHub repo, as it did here.
A python-appimage “recipe” folder (requirements.txt, a .desktop file, an icon, optionally entrypoint.*) maps onto the same options: requirements.txt entries become extras/packages, and the .desktop/icon files are picked up automatically once placed at one of the auto-detected locations (icon/desktop in the table above) or referenced explicitly.
Environment variables in AppRun
Extra environment variables are exported in the generated AppRun script:
[tool.appimage.env]
MY_PLUGIN_PATH = "/opt/plugins"
DEBUG = "0"
Extra files
Copy additional files or directories into the AppDir:
[tool.appimage.extra_files]
"assets/" = "assets/"
"config.toml" = "config.toml"
Keys are source paths relative to the project root; values are destination paths relative to AppDir.
Lifecycle hooks
Shell scripts called at specific points during the build. The APPDIR environment variable is set to the AppDir path when the hook runs.
[tool.appimage.hooks]
post_install = "scripts/post_install.sh" # after pip install, before assets are copied
pre_package = "scripts/pre_package.sh" # after all files are in place, before appimagetool
Installed packages are byte-compiled (hash-based, reproducible .pyc) right
after pre_package runs and before appimagetool packages the AppDir, so a
hook that edits an installed package’s source is still reflected in the
compiled bytecode.
Custom AppRun
When apprun is set, the file is copied as-is instead of generating one from the template. This gives full control over environment setup and the launch command:
[tool.appimage]
apprun = "packaging/AppRun"