Skip to main content

Poetry plugin to build AppImage from a poetry project

Project description

poetry-plugin-appimage

A plugin for poetry packaging and dependency manager that introduces a new command to build an AppImage for a python project.

Installation

  • Make sure you are using poetry>=1.2.0
  • Install the plugin to your poetry installation (aka poetry self) by running the command poetry self add poetry-plugin-appimage
  • Run poetry self show plugins to list all plugins installed by poetry. This command should display poetry-plugin-appimage and poetry-plugin-export

Usage

poetry build-appimage --help

Description:
  Builds an AppImage for the poetry project

Usage:
  build-appimage [options]

Options:
  -b, --build-number=BUILD-NUMBER  unique build number to identify the build (optional)
  -sc, --skip-cleanup              to inspect generated build resources for the project (optional)
  -sb, --skip-build                must be used with skip cleanup so the generated build files can be inspected and run manually (optional)
  -io, --include-only=INCLUDE-ONLY          specify a subfolder. only this subfolder will be included in the build (optional).
  -dg, --dependency-group=DEPENDENCY-GROUP  dependency group to use for building the appimage (optional). defaults to poetry default requirements setting.Can be used to only use specific dependencies for the appimage
  -ep, --entrypoints=ENTRYPOINTS            name(s) of the entrypoint(s) for the appimage. defaults to all entrypoints defined in pyproject.toml (optional)

Define the following section in your project's pyproject.toml with a valid miniconda version and python version. If python and miniconda are defined, the corresponding distribution of Miniconda3-py<python>-<miniconda> will be used. If either is not defined, Miniconda3-latest will be used.

Categories must be seperated by a semi-colon.

[tool.poetry-plugin-appimage]
miniconda = "4.8.3"
python = "3.7"
categories = "ConsoleOnly;"

Start a build using poetry build-appimage -b 42 where 42 is build identification number. The resultant binary is stored at dist/<APP_NAME>-<VERSION>.<BUILD_NUMBER>.AppImage

Example/Sample Project

Refer <src>/example_project for an exsample project.

How does it work ?

This plugin only runs on a suitable Linux machine, it depends on the new plugin system introduced in poetry 1.2.0 (hard requirement). It uses poetry.lock file as frozen dependencies for the python distribution within the AppImage and the content from pyproject.toml as metadata required for building the AppImage. Furthermore, it uses scripts defined in pyproject.toml as entry points of the AppImage.

This plugin is a wrapper that uses linuxdeploy toolchain and linuxdeploy-plugin-conda to create AppImages.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poetry_plugin_appimage-0.0.4.tar.gz (13.1 MB view details)

Uploaded Source

Built Distribution

poetry_plugin_appimage-0.0.4-py3-none-any.whl (13.1 MB view details)

Uploaded Python 3

File details

Details for the file poetry_plugin_appimage-0.0.4.tar.gz.

File metadata

File hashes

Hashes for poetry_plugin_appimage-0.0.4.tar.gz
Algorithm Hash digest
SHA256 f7a833d7521b1c10ace050affd81a7e8f3909d24256e4679cd4c6eae1c91d979
MD5 d5a14cf9a8a9e30a05de1899082910bc
BLAKE2b-256 d6832c322e391af8da0348650e1b4ef9367740c5c1a9eb16d2e72352551b55d8

See more details on using hashes here.

File details

Details for the file poetry_plugin_appimage-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for poetry_plugin_appimage-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8f008ca70ea5b023419f7eaeb17691d7df8e275b4833a39c360013029ca1aa6e
MD5 268b748c938e692944f070ce8303a08d
BLAKE2b-256 bdf8f279ce0a6ae451fc64e46a3fa2fa3adf2b6eeb9b3a0c70109b4cdaf6ab14

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page