From 1401decf4cab6fc72271f03c2a6842d8967d6a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= Date: Wed, 25 May 2022 22:24:11 -0400 Subject: [PATCH] Issue #123 - Update python dependencies - Pillow had a bug for JPEG - Now use the requirements.txt for the pip-flatpak --- README.md | 19 ++++++ org.inkscape.Inkscape.json | 6 +- python3-Pillow.json | 14 ---- python3-appdirs.json | 14 ---- python3-cssselect.json | 14 ---- python3-packaging.json | 19 ------ ...requests.json => python3-requirements.json | 67 ++++++++++++++++++- requirements.txt | 6 ++ 8 files changed, 90 insertions(+), 69 deletions(-) create mode 100644 README.md delete mode 100644 python3-Pillow.json delete mode 100644 python3-appdirs.json delete mode 100644 python3-cssselect.json delete mode 100644 python3-packaging.json rename python3-requests.json => python3-requirements.json (62%) create mode 100644 requirements.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..7c7a155 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# Python dependencies + +Inkscape need a certain number a Python modules at runtime. + +## `requirement.txt` + +There is a top level `requirement.txt` to that contain all the modules +that can be installed using the standard mechanism. + +The corresponding manifest fragment is `python3-requirements.json`. It +is generated using `flatpak-builder-tools`. +``` +./pip/flatpak-pip-generator -r PATH_TO/org.inkscape.Inkscape/requirements.txt +``` + +## `lxml` module + +Unfortunately `lxml` is not in the Platform but is in the Sdk. So it needs +to be force installed. diff --git a/org.inkscape.Inkscape.json b/org.inkscape.Inkscape.json index a672b30..d064421 100644 --- a/org.inkscape.Inkscape.json +++ b/org.inkscape.Inkscape.json @@ -233,11 +233,7 @@ "python3-tkinter.yaml", "python3-lxml.json", "python3-scour.json", - "python3-Pillow.json", - "python3-requests.json", - "python3-appdirs.json", - "python3-cssselect.json", - "python3-packaging.json", + "python3-requirements.json", { "name": "poppler-data", "buildsystem": "cmake-ninja", diff --git a/python3-Pillow.json b/python3-Pillow.json deleted file mode 100644 index 8eef39f..0000000 --- a/python3-Pillow.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "python3-Pillow", - "buildsystem": "simple", - "build-commands": [ - "pip3 install --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"Pillow\" --no-build-isolation" - ], - "sources": [ - { - "type": "file", - "url": "https://files.pythonhosted.org/packages/90/d4/a7c9b6c5d176654aa3dbccbfd0be4fd3a263355dc24122a5f1937bdc2689/Pillow-8.3.2.tar.gz", - "sha256": "dde3f3ed8d00c72631bc19cbfff8ad3b6215062a5eed402381ad365f82f0c18c" - } - ] -} diff --git a/python3-appdirs.json b/python3-appdirs.json deleted file mode 100644 index 0607f5b..0000000 --- a/python3-appdirs.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "python3-appdirs", - "buildsystem": "simple", - "build-commands": [ - "pip3 install --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"appdirs\" --no-build-isolation" - ], - "sources": [ - { - "type": "file", - "url": "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz", - "sha256": "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" - } - ] -} \ No newline at end of file diff --git a/python3-cssselect.json b/python3-cssselect.json deleted file mode 100644 index 9ce2643..0000000 --- a/python3-cssselect.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "python3-cssselect", - "buildsystem": "simple", - "build-commands": [ - "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"cssselect\" --no-build-isolation" - ], - "sources": [ - { - "type": "file", - "url": "https://files.pythonhosted.org/packages/3b/d4/3b5c17f00cce85b9a1e6f91096e1cc8e8ede2e1be8e96b87ce1ed09e92c5/cssselect-1.1.0-py2.py3-none-any.whl", - "sha256": "f612ee47b749c877ebae5bb77035d8f4202c6ad0f0fc1271b3c18ad6c4468ecf" - } - ] -} \ No newline at end of file diff --git a/python3-packaging.json b/python3-packaging.json deleted file mode 100644 index a77d8b8..0000000 --- a/python3-packaging.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "python3-packaging", - "buildsystem": "simple", - "build-commands": [ - "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"packaging\" --no-build-isolation" - ], - "sources": [ - { - "type": "file", - "url": "https://files.pythonhosted.org/packages/6c/10/a7d0fa5baea8fe7b50f448ab742f26f52b80bfca85ac2be9d35cdd9a3246/pyparsing-3.0.9-py3-none-any.whl", - "sha256": "5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc" - }, - { - "type": "file", - "url": "https://files.pythonhosted.org/packages/05/8e/8de486cbd03baba4deef4142bd643a3e7bbe954a784dc1bb17142572d127/packaging-21.3-py3-none-any.whl", - "sha256": "ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522" - } - ] -} \ No newline at end of file diff --git a/python3-requests.json b/python3-requirements.json similarity index 62% rename from python3-requests.json rename to python3-requirements.json index 47e883f..903002d 100644 --- a/python3-requests.json +++ b/python3-requirements.json @@ -1,8 +1,22 @@ { - "name": "python3-modules", + "name": "python3-requirements", "buildsystem": "simple", "build-commands": [], "modules": [ + { + "name": "python3-appdirs", + "buildsystem": "simple", + "build-commands": [ + "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"appdirs\" --no-build-isolation" + ], + "sources": [ + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/3b/00/2344469e2084fb287c2e0b57b72910309874c3245463acd6cf5e3db69324/appdirs-1.4.4-py2.py3-none-any.whl", + "sha256": "a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128" + } + ] + }, { "name": "python3-cachecontrol", "buildsystem": "simple", @@ -35,6 +49,11 @@ "url": "https://files.pythonhosted.org/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e2b62af10435d269a9d0f40564d/requests-2.27.1-py2.py3-none-any.whl", "sha256": "f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d" }, + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/83/63/15ce47ede5b03657e920f3f006e56ca9a16f7873978146f2f77e297bdd22/CacheControl-0.12.11-py2.py3-none-any.whl", + "sha256": "2c75d6a8938cb1933c75c50184549ad42728a27e9f6b92fd677c3151aa72555b" + }, { "type": "file", "url": "https://files.pythonhosted.org/packages/61/3c/2206f39880d38ca7ad8ac1b28d2d5ca81632d163b2d68ef90e46409ca057/msgpack-1.0.3.tar.gz", @@ -44,11 +63,53 @@ "type": "file", "url": "https://files.pythonhosted.org/packages/c8/22/9460e311f340cb62d26a38c419b1381b8593b0bb6b5d1f056938b086d362/lockfile-0.12.2-py2.py3-none-any.whl", "sha256": "6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa" + } + ] + }, + { + "name": "python3-cssselect", + "buildsystem": "simple", + "build-commands": [ + "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"cssselect\" --no-build-isolation" + ], + "sources": [ + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/3b/d4/3b5c17f00cce85b9a1e6f91096e1cc8e8ede2e1be8e96b87ce1ed09e92c5/cssselect-1.1.0-py2.py3-none-any.whl", + "sha256": "f612ee47b749c877ebae5bb77035d8f4202c6ad0f0fc1271b3c18ad6c4468ecf" + } + ] + }, + { + "name": "python3-packaging", + "buildsystem": "simple", + "build-commands": [ + "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"packaging\" --no-build-isolation" + ], + "sources": [ + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/6c/10/a7d0fa5baea8fe7b50f448ab742f26f52b80bfca85ac2be9d35cdd9a3246/pyparsing-3.0.9-py3-none-any.whl", + "sha256": "5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc" }, { "type": "file", - "url": "https://files.pythonhosted.org/packages/83/63/15ce47ede5b03657e920f3f006e56ca9a16f7873978146f2f77e297bdd22/CacheControl-0.12.11-py2.py3-none-any.whl", - "sha256": "2c75d6a8938cb1933c75c50184549ad42728a27e9f6b92fd677c3151aa72555b" + "url": "https://files.pythonhosted.org/packages/05/8e/8de486cbd03baba4deef4142bd643a3e7bbe954a784dc1bb17142572d127/packaging-21.3-py3-none-any.whl", + "sha256": "ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522" + } + ] + }, + { + "name": "python3-Pillow", + "buildsystem": "simple", + "build-commands": [ + "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"Pillow\" --no-build-isolation" + ], + "sources": [ + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/43/6e/59853546226ee6200f9ba6e574d11604b60ad0754d2cbd1c8f3246b70418/Pillow-9.1.1.tar.gz", + "sha256": "7502539939b53d7565f3d11d87c78e7ec900d3c72945d4ee0e2f250d598309a0" } ] }, diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6b5a2be --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +appdirs +cachecontrol[filecache] +cssselect +packaging +Pillow +requests