Verified Commit 802586af authored by tallero's avatar tallero

flatpak: update runtime to 3.34; added script to update python dependencies

parent ca90632d
# -*- coding: utf-8 -*-
# Property
# RoundedButton
#
# ----------------------------------------------------------------------
# Copyright © 2018 Pellegrino Prevete
# Copyright © 2018, 2019 Pellegrino Prevete
#
# All rights reserved
# ----------------------------------------------------------------------
......
......@@ -27,7 +27,7 @@ from copy import deepcopy as cp
from gi.repository.GLib import idle_add
from gi.repository.Gtk import STYLE_PROVIDER_PRIORITY_APPLICATION, AccelFlags, CssProvider, accelerator_parse
from os import makedirs, umask
from pickle import dump
from pickle import dumpn
from pickle import load as pickle_load
from re import IGNORECASE, compile, escape, sub
from threading import BoundedSemaphore, Thread
......
......@@ -2,3 +2,4 @@
build
build-dir
repo
update-dependencies
{
"app-id": "ml.prevete.Daty",
"runtime": "org.gnome.Platform",
"runtime-version":"3.32",
"runtime-version":"3.34",
"sdk": "org.gnome.Sdk",
"command" : "daty",
"finish-args" : [
......
{
"app-id" : "ml.prevete.Daty",
"runtime" : "org.gnome.Platform",
"runtime-version" : "3.32",
"runtime-version" : "3.34",
"sdk" : "org.gnome.Sdk",
"command" : "daty",
"x-run-args" : [
......
......@@ -7,8 +7,8 @@
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/48/69/d87c60746b393309ca30761f8e2b49473d43450b150cb08f3c6df5c11be5/appdirs-1.4.3.tar.gz",
"sha256": "9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92"
"url": "https://files.pythonhosted.org/packages/56/eb/810e700ed1349edde4cbdc1b2a21e28cdf115f9faf263f6bbf8447c1abf3/appdirs-1.4.3-py2.py3-none-any.whl",
"sha256": "d8b24664561d0d34ddfaec54636d502d7cea6e29c3eaf68f3df6180863e2166e"
}
]
}
\ No newline at end of file
......@@ -7,13 +7,13 @@
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/0c/52/e9088bb9b96e2d39fc3b33fcda5b4fde9d71473536ac660a1ca9a0958a2f/soupsieve-1.8.tar.gz",
"sha256": "eaed742b48b1f3e2d45ba6f79401b2ed5dc33b2123dfe216adb90d4bfa0ade26"
"url": "https://files.pythonhosted.org/packages/0b/44/0474f2207fdd601bb25787671c81076333d2c80e6f97e92790f8887cf682/soupsieve-1.9.3-py2.py3-none-any.whl",
"sha256": "a5a6166b4767725fd52ae55fee8c8b6137d9a51e9f1edea461a062a759160118"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/80/f2/f6aca7f1b209bb9a7ef069d68813b091c8c3620642b568dac4eb0e507748/beautifulsoup4-4.7.1.tar.gz",
"sha256": "945065979fb8529dd2f37dbb58f00b661bdbcbebf954f93b32fdf5263ef35348"
"url": "https://files.pythonhosted.org/packages/1a/b7/34eec2fe5a49718944e215fde81288eec1fa04638aa3fb57c1c6cd0f98c3/beautifulsoup4-4.8.0-py3-none-any.whl",
"sha256": "f040590be10520f2ea4c2ae8c3dae441c7cfff5308ec9d58a0ec0c1b8f81d469"
}
]
}
\ No newline at end of file
......@@ -7,18 +7,18 @@
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz",
"sha256": "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"
"url": "https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl",
"sha256": "3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz",
"sha256": "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73"
"url": "https://files.pythonhosted.org/packages/f4/24/2a3e3df732393fed8b3ebf2ec078f05546de641fe1b667ee316ec1dcf3b7/webencodings-0.5.1-py2.py3-none-any.whl",
"sha256": "a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/78/5a/0df03e8735cd9c75167528299c738702437589b9c71a849489d00ffa82e8/bleach-3.1.0.tar.gz",
"sha256": "3fdf7f77adcf649c9911387df51254b813185e32b2c6619f690b593a617e19fa"
"url": "https://files.pythonhosted.org/packages/ab/05/27e1466475e816d3001efb6e0a85a819be17411420494a1e602c36f8299d/bleach-3.1.0-py2.py3-none-any.whl",
"sha256": "213336e49e102af26d9cde77dd2d0397afabc5a6bf2fed985dc35b5d1e285a16"
}
]
}
\ No newline at end of file
{
"name": "python3-gobject",
"buildsystem": "simple",
"build-commands": [
"pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} gobject"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/35/69/9148b849a9e54297e31eac6ce5fa61d8e82921cd990bbda9dfb6be7a5f84/gobject-0.1.0-py3-none-any.whl",
"sha256": "e985e17809810e7bd0bc2d34cb6c9ee6abde6cde94d89855e889a3f836b056b5"
}
]
}
\ No newline at end of file
......@@ -7,13 +7,13 @@
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/a6/54/23d6cf3e8d8f1eb30e0e58f171b6f62b2ea75c024935492373639a1a08e4/pycairo-1.18.0.tar.gz",
"sha256": "abd42a4c9c2069febb4c38fe74bfc4b4a9d3a89fea3bc2e4ba7baff7a20f783f"
"url": "https://files.pythonhosted.org/packages/48/20/5e83af98eb897935bf7dc39455e892ba866feebb9b7c3b392982866f9958/pycairo-1.18.1.tar.gz",
"sha256": "70172e58b6bad7572a3518c26729b074acdde15e6fee6cbab6d3528ad552b786"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/0b/fd/56ac6898afc5c7f5718026103bd8f0b44714b6f79ac20d7eb8990c9a7eab/PyGObject-3.32.0.tar.gz",
"sha256": "a4d6f6d8e688d28e07119fc83aabc6e7aad02057f48b2194089959d03654f695"
"url": "https://files.pythonhosted.org/packages/46/8a/b183f3edc812d4d28c8b671a922b5bc2863be5d38c56b3ad9155815e78dd/PyGObject-3.34.0.tar.gz",
"sha256": "2acb0daf2b3a23a90f52066cc23d1053339fee2f5f7f4275f8baa3704ae0c543"
}
]
}
\ No newline at end of file
......@@ -7,33 +7,33 @@
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/06/b8/d1ea38513c22e8c906275d135818fee16ad8495985956a9b7e2bb21942a1/certifi-2019.3.9.tar.gz",
"sha256": "b26104d6835d1f5e49452a26eb2ff87fe7090b89dfcaee5ea2212697e1e1d7ae"
"url": "https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl",
"sha256": "fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz",
"sha256": "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22"
"url": "https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl",
"sha256": "b246607a25ac80bedac05c6f282e3cdaf3afb65420fd024ac94435cabe6e18d1"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz",
"sha256": "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407"
"url": "https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl",
"sha256": "ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz",
"sha256": "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"
"url": "https://files.pythonhosted.org/packages/18/b0/8146a4f8dd402f60744fa380bc73ca47303cccf8b9190fd16a827281eac2/certifi-2019.9.11-py2.py3-none-any.whl",
"sha256": "fd7c7c74727ddcf00e9acd26bba8da604ffec95bf1c2144e67aff7a8b50e6cef"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/52/2c/514e4ac25da2b08ca5a464c50463682126385c4272c18193876e91f4bc38/requests-2.21.0.tar.gz",
"sha256": "502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e"
"url": "https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl",
"sha256": "9cf5292fcd0f598c671cfc1e0d7d1a7f13bb8085e9a590f48c010551dc6c4b31"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/eb/f6/52e84b384ddeb805bafcc59ede377e03bb7dc2e6e441433e2794dec3f7a3/pywikibot-3.0.20190301.tar.gz",
"sha256": "14d19744588e7f8753c51e43734544a2533186deee27d44ed841eff8a48c9376"
"url": "https://files.pythonhosted.org/packages/af/b5/85df72e222d21371898cdc18ae36192d3fbdf95f58f093d0c2403f42734d/pywikibot-3.0.20190722.tar.gz",
"sha256": "a0388717038293202ea92eeb7099e8bd87f258304f371a8a8f87a74e233e9cd4"
}
]
}
\ No newline at end of file
......@@ -7,28 +7,28 @@
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/06/b8/d1ea38513c22e8c906275d135818fee16ad8495985956a9b7e2bb21942a1/certifi-2019.3.9.tar.gz",
"sha256": "b26104d6835d1f5e49452a26eb2ff87fe7090b89dfcaee5ea2212697e1e1d7ae"
"url": "https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl",
"sha256": "b246607a25ac80bedac05c6f282e3cdaf3afb65420fd024ac94435cabe6e18d1"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz",
"sha256": "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22"
"url": "https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl",
"sha256": "ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz",
"sha256": "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407"
"url": "https://files.pythonhosted.org/packages/18/b0/8146a4f8dd402f60744fa380bc73ca47303cccf8b9190fd16a827281eac2/certifi-2019.9.11-py2.py3-none-any.whl",
"sha256": "fd7c7c74727ddcf00e9acd26bba8da604ffec95bf1c2144e67aff7a8b50e6cef"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz",
"sha256": "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"
"url": "https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl",
"sha256": "fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/52/2c/514e4ac25da2b08ca5a464c50463682126385c4272c18193876e91f4bc38/requests-2.21.0.tar.gz",
"sha256": "502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e"
"url": "https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl",
"sha256": "9cf5292fcd0f598c671cfc1e0d7d1a7f13bb8085e9a590f48c010551dc6c4b31"
}
]
}
\ No newline at end of file
#!/usr/bin/env python3
from subprocess import check_output
from subprocess import CalledProcessError, STDOUT
from os import listdir as ls
from os.path import splitext
from shutil import rmtree as rm
b = lambda x: bytes(x, encoding='utf-8')
already_exists_error = "fatal: destination path 'update-dependencies' already exists and is not an empty directory.\n"
is_python_package = lambda x: True if x.endswith('json') and x.startswith('python3') else False
get_package_name = lambda x: splitext(x.split('python3-')[1])[0]
def sh(command, callback=None, exception_handler=None, callback_args=[], exception_handler_args=[], retries=5):
i = 0
while i < retries:
try:
command = command.split(" ")
out = check_output(command, stderr=STDOUT)
if callback:
callback(*callback_args)
return True
except CalledProcessError as e:
if exception_handler:
exception_handler(e, *exception_handler_args)
return True
i += 1
print(i)
clone = "git clone https://github.com/flatpak/flatpak-builder-tools update-dependencies"
def clone_exception_handler(exception):
if exception.output == b(already_exists_error):
print("repository already exists, pulling changes...")
pull = "git -C ./update-dependencies pull"
sh(pull)
sh(clone, clone_exception_handler)
for x in ls():
if is_python_package(x):
y = get_package_name(x)
print("Updating {}".format(y))
update = "./update-dependencies/pip/flatpak-pip-generator {}".format(y)
sh(update)
print("Removing temporary directory...")
rm('update-dependencies')
Editor: object selected: Q473873
Value: object selected
Page: claim changed
new entity
{'Description': 'video hosting service', 'Label': 'Vevo', 'URI': 'Q473873'}
Claim
{'id': 'Q866$15c08287-4ec3-e63b-db37-91086927d137',
'mainsnak': {'datatype': 'wikibase-item',
'datavalue': {'type': 'wikibase-entityid',
'value': {'entity-type': 'item',
'numeric-id': 559856}},
'property': 'P31',
'snaktype': 'value'},
'rank': 'normal',
'type': 'statement'}
Editor: object selected: Q27968
Value: object selected
Page: claim changed
new entity
{'Description': 'English Studies', 'Label': 'English Studies', 'URI': 'Q27968'}
Claim
{'datatype': 'wikibase-item',
'datavalue': {'type': 'wikibase-entityid',
'value': {'entity-type': 'item', 'numeric-id': 1860}},
'hash': 'daf1c4fcb58181b02dff9cc89deb084004ddae4b',
'property': 'P407',
'snaktype': 'value'}
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="valign">center</property>
<property name="margin_bottom">18</property>
<property name="row_spacing">6</property> >
<property name="column_spacing">12</property>
<property name="hexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">out</property>
<child>
<object class="GtkLabel" id="username_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_markup" translatable="yes">_("Wikimedia username description")</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Username</property>
<property name="justify">right</property>
<attributes>
<attribute name="font-desc" value="Cantarell 10"/>
</attributes>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkListBox" id="credentials">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="selection_mode">none</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment