Flatpak and Python
Goffi
goffi at goffi.org
Sun Jul 8 09:08:37 UTC 2018
Hello,
I'm trying to package my software for Flatpak (https://salut-a-toi.org),
and I'm run into a couple of issues (flatpak version: 0.99.2) :
1) it's using Python, I've run into this page:
https://www.loganasherjones.com/2018/05/using-flatpak-with-python/
which is installing Python manually (while it's already in
org.freedesktop.Platform runtime), then activating network for
installation, but http://docs.flatpak.org/en/latest/python.html says to
download depencies separately then install without network.
Is the way with network activation OK ?
2) the project is using Python 2. The flatpak-pip-generator script use the
--prefix option with pip, but the pip2 available in the image is too old
(7.1.0 while last version is 10.0.1) and doesn't have this option. Would is
be possible to update it in the runtime ?
3) I try to update myself pip, then to install my dependencies, you can see
my manifest attached. I keep getting a "No matching distribution found for
setuptools" while I explictly install setuptools
4) there is a FS issue, /app/lib/python2.7/site-packages/easy-install.pth
can't be updated:
% flatpak-builder build-dir org.salutatoi.SAT.json --force-clean --build-
shell=sat
Downloading sources
========================================================================
Building module sat in /home/goffi/dev/sat_docs/flatpak/.flatpak-builder/
build/sat-43
========================================================================
sh-4.3$ cd /app/lib/python2.7/site-packages/
sh-4.3$ cat easy-install.pth
import sys; sys.__plen = len(sys.path)
./lxml-3.7.3-py2.7-linux-x86_64.egg
import sys; new = sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p =
getattr(sys, '__egginsert', 0); sys.path[p:p] = new; sys.__egginsert = p +
len(new)
sh-4.3$ echo test >> easy-install.pth
sh: easy-install.pth: Read-only file system
sh-4.3$
So for now I'm blocked. Any help would be welcomed, thanks in advance!
Goffi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: org.salutatoi.SAT.json
Type: application/json
Size: 18786 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/flatpak/attachments/20180708/cf5f0f8d/attachment.json>
More information about the Flatpak
mailing list