Generates a flatpak-builder build module for installing python packages defined in requirements.txt files.
Project description
req2flatpak
req2flatpak is a script to convert python package requirements to a flatpak-builder build module. The module will install the required python packages as part of a flatpak build.
Intended Use
req2flatpak is for programmers who want to package a python application using flatpak.
The req2flatpak script takes python package requirements as input, e.g., as requirements.txt file. It allows to specify the target platform’s python version and architecture. The script outputs an automatically generated flatpak-builder build module. The build module, if included into a flatpak-builder build manifest, will install the python packages using pip.
Getting Started
Run pip install req2flatpak to install the latest release of req2flatpak.
It is possible to use req2flatpak from the commandline, as well as programmatically from a python script.
Commandline usage means you can invoke req2flatpak’s commandline interface as follows, in order to generate a flatpak-builder build module from given python package requirements:
./req2flatpak.py --requirements-file requirements.txt --target-platforms 310-x86_64 310-aarch64
When invoked like this, req2flatpak will read the requirements file, query pypi about available downloads for the requirements, choose appropriate downloads for the specified target platforms, and generate a flatpak-builder build module. The module, if included in a flatpak-builder build manifest, will install the required packages using pip.
The commandline option to define target platforms uses the format <pythonversion>-<architecture>. To learn more about available commandline options, run req2flatpak.py --help.
Programmatic usage is also possible. This means you can invoke functionality from req2flatpak in your own python script, allowing you to tweak the desired behavior in many ways. The documentation describes req2flatpak’s python api and includes code examples to help you get started quickly.
Documentation
Contributing
req2flatpak is developed in an open-source, community-driven way, as a voluntary effort in the authors’ free time.
All contributions are greatly appreciated… pull requests are welcome, and so are bug reports and suggestions for improvement. See req2flatpak’s documentation for how to set up a development environment and how to contribute back to req2flatpak.
License
req2flatpak is MIT-licensed, see the COPYING file.
Changelog
v0.2 (2023-06-04) “Yaml”
Highlight: req2flatpak can now generate yaml output.
Features:
Adds yaml output. It is now possible to generate yaml output by specifying a .yaml file extension or by specifying the --yaml commandline option.
Bugfixes:
v0.1 (2022-12-23) “Initial Release”
Highlight: This is the initial release of req2flatpak.
Features:
Generates a flatpak-builder build module for given python package requirements; the module will install the required packages as part of a flatpak build.
This initial release already comes with documentation, a clean code style, and automated tests that are run using continuous integration.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file req2flatpak-0.2.0.tar.gz
.
File metadata
- Download URL: req2flatpak-0.2.0.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.6 Linux/5.15.0-1038-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61b81cf53c845c2a528de5c22338052771c7c7b2ecf4f8f19131232b5b0d5a85 |
|
MD5 | 7e76e283a1ebc5759fc75a9451c96c2e |
|
BLAKE2b-256 | 57e9265d5dc19f237691d85eb4223bef39d8e9caf3b3234fa68f430429a9a1ed |
File details
Details for the file req2flatpak-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: req2flatpak-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.6 Linux/5.15.0-1038-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15f7c719b6c4f3cdd44c836a023d7d968ee5b2ff9de4091695e59f930a1dc086 |
|
MD5 | a952eedc63079e1a8285a91006836bd0 |
|
BLAKE2b-256 | 7181ad8c7550f48c38eafb32339ba124638feedfb1bf359c110772608946167e |