Hello!
I am attempting to create my first Flatpak, which is an existing Python app that runs fine on my machine:
(To install and run the app, I start a virtual env, pip install the requirements, and run main.py.)
The steps I have taken so far for flatpaking are:
# this works
flatpak install flathub org.gnome.Sdk/x86_64/47
# this seems to work
python3 flatpak-pip-generator --build-isolation --requirements-file=requirements.txt --runtime=org.gnome.Sdk/x86_64/47
Create org.curiositry.selfctrlpanel.json
with the contents:
{
"app-id": "org.curiositry.selfctrlpanel",
"runtime": "org.gnome.Platform",
"runtime-version": "47",
"sdk": "org.gnome.Sdk",
"command": "python3 main.py",
"modules": [
"python3-requirements.json",
{
"name": "what-am-i-doing",
"buildsystem": "simple",
"build-commands": [
"pip3 install --prefix=/app --no-deps ."
],
"sources": [
{
"type": "git",
"branch": "main",
"url": "https://gitlab.com/GitFr33/what-am-i-doing.git"
}
]
}
],
"finish-args": [
"--share=ipc",
"--socket=x11",
"--socket=wayland",
"--device=dri"
]
}
And then run the builder:
flatpak-builder --force-clean --install-deps-from=flathub flatpak-build org.curiositry.selfctrlpanel.json
However, this always throws pip dependency errors, so I suspect I’m doing something horribly wrong. Currently, I’m getting:
ERROR: No matching distribution found for Cython>=3.0.10
Previously, it complained about meson-python, and then various dependencies of dbus-python. I’m pretty sure that adding more things to the requirements.txt is not the answer…
Could anyone who is familiar with flatpacking python apps give me a pointer about where I have made a wrong turn?
Thanks so much!