From 44f9af2cd94a1ca463aac2c075c66ead89d14bc2 Mon Sep 17 00:00:00 2001 From: Valentin Niess Date: Sat, 4 Apr 2020 17:03:47 +0200 Subject: [PATCH] Update appstream meta & disable checks --- applications/scipy/scipy.appdata.xml | 5 ++--- applications/tasmotizer/tasmotizer.appdata.xml | 2 +- applications/xonsh/xonsh.appdata.xml | 5 ++--- python_appimage/appimage/build.py | 15 ++++++++++++--- python_appimage/data/python.appdata.xml | 2 +- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/applications/scipy/scipy.appdata.xml b/applications/scipy/scipy.appdata.xml index 34481aa..5e9506f 100644 --- a/applications/scipy/scipy.appdata.xml +++ b/applications/scipy/scipy.appdata.xml @@ -1,11 +1,10 @@ scipy - Python-2.0 + MIT Python-2.0 Scipy - A Python {{ python-fullversion }} runtime with {{ requirements }} - + A Python {{ python-fullversion }} runtime with {{ requirements }}

A relocated Python {{ python-fullversion }} installation containing the scipy packages suite ({{ requirements }}) and running from an diff --git a/applications/tasmotizer/tasmotizer.appdata.xml b/applications/tasmotizer/tasmotizer.appdata.xml index 46ed966..c85d2fa 100644 --- a/applications/tasmotizer/tasmotizer.appdata.xml +++ b/applications/tasmotizer/tasmotizer.appdata.xml @@ -1,7 +1,7 @@ tasmotizer - Python-2.0 + MIT Python-2.0 Tasmotizer

ESP... The time has come to... Tasmotize diff --git a/applications/xonsh/xonsh.appdata.xml b/applications/xonsh/xonsh.appdata.xml index e1e1c59..178856a 100644 --- a/applications/xonsh/xonsh.appdata.xml +++ b/applications/xonsh/xonsh.appdata.xml @@ -1,11 +1,10 @@ xonsh - Python-2.0 + MIT Python-2.0 Xonsh - Xonsh on Python {{ python-fullversion }} - + Xonsh on Python {{ python-fullversion }}

Python {{ python-fullversion }} + Xonsh bundled in an AppImage.

diff --git a/python_appimage/appimage/build.py b/python_appimage/appimage/build.py index de9962c..967cdcc 100644 --- a/python_appimage/appimage/build.py +++ b/python_appimage/appimage/build.py @@ -1,4 +1,5 @@ import os +import re import subprocess import sys @@ -22,7 +23,7 @@ def build_appimage(appdir=None, destination=None): log('BUILD', appdir) ensure_appimagetool() - cmd = [APPIMAGETOOL, appdir] + cmd = [APPIMAGETOOL, '--no-appstream', appdir] if destination is not None: cmd.append(destination) cmd = ' '.join(cmd) @@ -30,7 +31,10 @@ def build_appimage(appdir=None, destination=None): debug('SYSTEM', cmd) p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - stdout = [] + + appimage_pattern = re.compile('should be packaged as ([^ ]+[.]AppImage)') + + stdout, appimage = [], None while True: out = decode(p.stdout.readline()) stdout.append(out) @@ -44,9 +48,14 @@ def build_appimage(appdir=None, destination=None): elif line.startswith('Error'): raise RuntimeError(line) else: + if destination is None: + match = appimage_pattern.search(line) + if match is not None: + destination = match.group(1) debug('APPIMAGE', line) + rc = p.poll() - if rc != 0: + if rc != 0 and not os.path.exists(destination): print(''.join(stdout)) sys.stdout.flush() raise RuntimeError('Could not build AppImage') diff --git a/python_appimage/data/python.appdata.xml b/python_appimage/data/python.appdata.xml index ab69c6c..70eaf8f 100644 --- a/python_appimage/data/python.appdata.xml +++ b/python_appimage/data/python.appdata.xml @@ -1,7 +1,7 @@ python{{fullversion}} - Python-2.0 + MIT Python-2.0 Python {{version}} A Python {{version}} runtime