From 0ddc33a37b7a6e0db7b09fc9242985a7fe0db2aa Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 7 Jun 2019 15:16:19 +1000 Subject: [PATCH 1/5] drawing: fix deprecation warning tuhi/drawing.py:46: PyGIDeprecationWarning: GObject.property is deprecated; use GObject.Property instead @GObject.property Signed-off-by: Peter Hutterer --- tuhi/drawing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuhi/drawing.py b/tuhi/drawing.py index 01ad32a..04adb49 100644 --- a/tuhi/drawing.py +++ b/tuhi/drawing.py @@ -43,7 +43,7 @@ class Stroke(GObject.Object): self._pressure = 0 self._is_sealed = False - @GObject.property + @GObject.Property def sealed(self): return self._is_sealed From a1ca70df28eb21157bc040d0646f7717c459c118 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 7 Jun 2019 14:29:52 +1000 Subject: [PATCH 2/5] flatpak: update to freedesktop.org SDK 18.08 This one now includes Python 3.7, so we don't need to do it build it ourselves. Fix the kete path up for 3.7 as well so this works again. And finally, fix the pip incovations, the current ones we have install into /usr/ which is read-only. Use the pip3 command generated by the flatpak-pip-generator as listed on http://docs.flatpak.org/en/latest/python.html Signed-off-by: Peter Hutterer --- org.freedesktop.tuhi.json | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/org.freedesktop.tuhi.json b/org.freedesktop.tuhi.json index f12d49e..87594e1 100644 --- a/org.freedesktop.tuhi.json +++ b/org.freedesktop.tuhi.json @@ -3,7 +3,7 @@ "command": "/app/bin/tuhi", "runtime": "org.freedesktop.Platform", "sdk": "org.freedesktop.Sdk", - "runtime-version": "1.6", + "runtime-version": "18.08", "cleanup": [ "/cache", "/include", "/lib/pkgconfig", @@ -26,27 +26,11 @@ "--own-name=org.freedesktop.tuhi1" ], "modules": [ - { - "name": "cpython", - "sources": [ - { - "type": "archive", - "url": "https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz", - "sha256": "159b932bf56aeaa76fd66e7420522d8c8853d486b8567c459b84fe2ed13bcaba" - } - ] - }, { "name": "pycairo", - "build-options" : { - "env": { - "PYTHON": "/app/bin/python3" - } - }, "buildsystem": "simple", "build-commands": [ - "python3 ./setup.py sdist", - "pip3 install dist/*.tar.gz" + "pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} ." ], "sources": [ { @@ -59,11 +43,6 @@ { "name": "pygobject", "config-opts": ["--enable-compile-warnings=minimum"], - "build-options" : { - "env": { - "PYTHON": "/app/bin/python3" - } - }, "sources": [ { "type": "archive", @@ -82,8 +61,7 @@ } ], "build-commands": [ - "python3 ./setup.py sdist", - "pip3 install dist/*.tar.gz" + "pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} ." ] }, { @@ -97,8 +75,7 @@ } ], "build-commands": [ - "python3 ./setup.py sdist", - "pip3 install dist/*.tar.gz" + "pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} ." ] }, { @@ -111,8 +88,7 @@ } ], "build-commands": [ - "python3 ./setup.py sdist", - "pip3 install dist/*.tar.gz" + "pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} ." ] }, { @@ -125,10 +101,10 @@ } ], "build-commands": [ - "python3 setup.py install --verbose" + "pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} ." ], "post-install": [ - "cp tools/kete.py /app/lib/python3.6/site-packages/kete.py", + "cp tools/kete.py /app/lib/python3.7/site-packages/kete.py", "cp tools/tuhi-kete-sandboxed.py /app/bin/tuhi-kete", "chmod +x /app/bin/tuhi-kete" ] From 594fad1d3c2427293f86392b2b06026262765804 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 7 Jun 2019 14:44:37 +1000 Subject: [PATCH 3/5] flatpak: update pycairo to the latest version Signed-off-by: Peter Hutterer --- org.freedesktop.tuhi.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.freedesktop.tuhi.json b/org.freedesktop.tuhi.json index 87594e1..697a06a 100644 --- a/org.freedesktop.tuhi.json +++ b/org.freedesktop.tuhi.json @@ -35,8 +35,8 @@ "sources": [ { "type": "archive", - "url": "https://github.com/pygobject/pycairo/releases/download/v1.14.1/pycairo-1.14.1.tar.gz", - "sha256": "0d13a0a6eeaf0c357db04392943eb9b25767445608d31dde1307f003f68c5754" + "url": "https://github.com/pygobject/pycairo/releases/download/v1.18.1/pycairo-1.18.1.tar.gz", + "sha256": "70172e58b6bad7572a3518c26729b074acdde15e6fee6cbab6d3528ad552b786" } ] }, From d6a97337d9d6d5328766409c1df0e7f5bf696463 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 7 Jun 2019 15:39:57 +1000 Subject: [PATCH 4/5] flatpak: update pyparsing to latest stable version Signed-off-by: Peter Hutterer --- org.freedesktop.tuhi.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.freedesktop.tuhi.json b/org.freedesktop.tuhi.json index 697a06a..11c0bf3 100644 --- a/org.freedesktop.tuhi.json +++ b/org.freedesktop.tuhi.json @@ -70,8 +70,8 @@ "sources": [ { "type": "archive", - "url": "http://downloads.sourceforge.net/pyparsing/pyparsing-2.1.10.tar.gz", - "sha512": "21af73d6f479d52746f269c8fbaf90c1107a8aec756d30af8c7c4e6a2ff0ea9659cc07816b7ea19286bc12d43497f5e8e63351453bf18daf6a1cb380a195532e" + "url": "https://github.com/pyparsing/pyparsing/releases/download/pyparsing_2.4.0/pyparsing-2.4.0.tar.gz", + "sha512": "71877dc006cce5c1b1d45e7cc89cd60e03cb80353387fb0c6498cfc0d69af465dc574d1bceb87248033e7a82694aa940e9fce1ca80b2ef538a8df51f697ef530" } ], "build-commands": [ From 6837c29f69f6802f1334408528bf17b8062218e6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 7 Jun 2019 16:17:21 +1000 Subject: [PATCH 5/5] flatpak: update to pygobject 3.32 Drop pycairo by way of an environment variable, because we don't need it for tuhi. The way pygobject is setup it checks for setuptools during pip3 and then complains that it's not there: Collecting setuptools Could not find a version that satisfies the requirement setuptools (from versions: ) No matching distribution found for setuptools It's not actually needed since it has a fallback, but clearly... anyway. Let's use the plain setup.py invocation, but with the right --prefix. Of course that setup.py invocation doesn't work for the other packages, so let's leave pip3 in place for those. Because how much worse would the world be if this would just work... Signed-off-by: Peter Hutterer --- org.freedesktop.tuhi.json | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/org.freedesktop.tuhi.json b/org.freedesktop.tuhi.json index 11c0bf3..f1721ef 100644 --- a/org.freedesktop.tuhi.json +++ b/org.freedesktop.tuhi.json @@ -27,27 +27,21 @@ ], "modules": [ { - "name": "pycairo", + "name": "pygobject", "buildsystem": "simple", "build-commands": [ - "pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} ." + "python3 setup.py install --prefix=/app" ], - "sources": [ - { - "type": "archive", - "url": "https://github.com/pygobject/pycairo/releases/download/v1.18.1/pycairo-1.18.1.tar.gz", - "sha256": "70172e58b6bad7572a3518c26729b074acdde15e6fee6cbab6d3528ad552b786" + "build-options": { + "env": { + "PYGOBJECT_WITHOUT_PYCAIRO" : "1" } - ] - }, - { - "name": "pygobject", - "config-opts": ["--enable-compile-warnings=minimum"], + }, "sources": [ { "type": "archive", - "url": "http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.27/pygobject-3.27.5.tar.xz", - "sha256": "3e57f42a48f7e762a791ccec2514894945829dc1e70caeea0252505cbddbeda4" + "url": "https://ftp.gnome.org/pub/GNOME/sources/pygobject/3.32/pygobject-3.32.1.tar.xz", + "sha256": "32c99def94b8dea5ce9e4bc99576ef87591ea779b4db77cfdca7af81b76d04d8" } ] },