Run under flatpak
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GTG |
Fix Released
|
Critical
|
Unassigned |
Bug Description
Tentative manifest to run under flatpak.
To build:
flatpak-builder --ccache --force-clean build org.gnome.Gtg.json
To run:
flatpak-builder --run build org.gnome.Gtg.json gtg
Added file:
org.gnome.Gtg.json
```
{
"app-id": "org.gnome.Gtg",
"runtime": "org.gnome.
"runtime-
"sdk": "org.gnome.Sdk",
"command": "gtg",
"cleanup": [
"/include",
"/lib/
"/share/
"/share/
"/man",
"/share/man",
"/share/
"/share/vala",
"*.la",
"*.a",
"*.pyc",
"*.pyo"
],
"build-options": {
"cflags": "-O2 -g",
"cxxflags": "-O2 -g",
"env": {
"V": "1"
}
},
"finish-args": [
"--share=ipc",
"--socket=x11",
"--
"--
"--
"--
],
"modules": [
{
"name": "python-dbus",
"sources": [
{
"type": "archive",
"url": "https:/
"sha256": "e2f1d6871f74fb
}
],
"
"env": {
"PYTHON": "python3.5"
}
}
},
{
"name": "liblarch",
"no-autogen": true,
"
"
"python3 setup.py build",
"python3 setup.py install --prefix /app"
],
"sources": [
{
"type": "git",
"url": "https:/
}
]
},
{
"name": "pyxdg",
"no-autogen": true,
"
"
"python3 setup.py build",
"python3 setup.py install --prefix /app"
],
"sources": [
{
"type": "git",
"url": "https:/
}
],
"
"env": {
"PYTHON": "python3.5"
}
}
},
{
"name": "gtg",
"no-autogen": true,
"
"
"python3 setup.py build",
"python3 setup.py install --prefix /app"
],
"sources": [
{
"type": "git",
"url": "https:/
}
]
}
]
}
```
it fails with:
```
$ flatpak-builder --run build org.gnome.Gtg.json gtg
/app/bin/gtg:54: PyGIWarning: Gdk was imported without specifying a version first. Use gi.require_
from gi.repository.Gdk import Screen
(gtg:3): dbind-WARNING **: 08:58:10.314: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-
/app/lib/
from gi.repository import GObject, Gtk
Traceback (most recent call last):
File "<frozen importlib.
AttributeError: 'DynamicImporter' object has no attribute 'find_spec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/bin/gtg", line 62, in <module>
from GTG.gtk.manager import Manager
File "/app/lib/
from GTG.gtk.
File "/app/lib/
from GTG.gtk.
File "/app/lib/
from GTG.tools.
File "/app/lib/
from gi.repository import NetworkManager, NMClient
File "/usr/lib/
'introspection typelib not found' % namespace)
ImportError: cannot import name NetworkManager, introspection typelib not found
```
description: | updated |
Changed in gtg: | |
status: | In Progress → Fix Released |
For one thing, I'm not sure I recall GTG having migrated to Python3, quite possibly it's still a Python2 app and depending on the whole GTK2 + PyGTK stack, hence the PyGI errors, maybe. I don't know how the NetworkManager support is to be handled in a flatpak (or in this case in particular), on the other hand.