Skip to content

Commit 8293000

Browse files
authored
Install the required Python packages in the Flatpak manifest (#61)
1 parent 2f75a51 commit 8293000

4 files changed

+58
-10
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,9 @@ dmypy.json
127127

128128
# Pyre type checker
129129
.pyre/
130+
131+
# Flatpak
132+
.flatpak-builder/
133+
build-dir/
134+
repo/
135+

README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,9 @@ Once the container is running, you can launch the app:
6363

6464
```sh
6565
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
66-
flatpak install --user flathub org.gnome.Sdk//3.38 org.gnome.Platform//3.38
66+
flatpak install --user flathub org.gnome.Sdk//40 org.gnome.Platform//40
6767

68-
flatpak-builder --repo=repo --force-clean build-dir/ com.github.alexr4535.siglo.json
69-
flatpak build-bundle ./repo/ siglo.flatpak com.github.alexr4535.siglo
70-
flatpak install --user ./siglo.flatpak
68+
flatpak-builder --user --install --repo=repo --force-clean build-dir/ com.github.alexr4535.siglo.json
7169
```
7270

7371
### Cross-compiling for PinePhone
@@ -77,7 +75,7 @@ Example cross-compiling for PinePhone on an `x86_64` Fedora machine:
7775
```sh
7876
sudo dnf install qemu-system-arm qemu-user-static
7977
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
80-
flatpak install --user flathub org.gnome.Sdk/aarch64/3.38 org.gnome.Platform/aarch64/3.38
78+
flatpak install --user flathub org.gnome.Sdk/aarch64/40 org.gnome.Platform/aarch64/40
8179

8280
flatpak-builder --arch=aarch64 --repo=repo --force-clean build-dir com.github.alexr4535.siglo.json
8381
flatpak build-bundle --arch=aarch64 ./repo/ siglo.flatpak com.github.alexr4535.siglo

com.github.alexr4535.siglo.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"*.a"
2525
],
2626
"modules" : [
27-
"python3-requests.json",
27+
"python3-modules.json",
2828
{
2929
"name" : "siglo",
3030
"builddir" : true,

python3-modules.json

+48-4
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,75 @@
99
"build-commands": [
1010
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"gatt\" --no-build-isolation"
1111
],
12-
"sources": []
12+
"sources": [
13+
{
14+
"type": "file",
15+
"url": "https://files.pythonhosted.org/packages/96/d0/d66154053d5b47996731d80ee66f65bdf7b790258addc0b6a5f50bcc3579/gatt-0.2.7.tar.gz",
16+
"sha256": "626d9de24a178b6eaff78c31b0bd29f962681da7caf18eb20363f6288d014e3a"
17+
}
18+
]
1319
},
1420
{
1521
"name": "python3-dbus-python",
1622
"buildsystem": "simple",
1723
"build-commands": [
1824
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"dbus-python\" --no-build-isolation"
1925
],
20-
"sources": []
26+
"sources": [
27+
{
28+
"type": "file",
29+
"url": "https://files.pythonhosted.org/packages/62/7e/d4fb56a1695fa65da0c8d3071855fa5408447b913c58c01933c2f81a269a/dbus-python-1.2.16.tar.gz",
30+
"sha256": "11238f1d86c995d8aed2e22f04a1e3779f0d70e587caffeab4857f3c662ed5a4"
31+
}
32+
]
2133
},
2234
{
2335
"name": "python3-requests",
2436
"buildsystem": "simple",
2537
"build-commands": [
2638
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"requests\" --no-build-isolation"
2739
],
28-
"sources": []
40+
"sources": [
41+
{
42+
"type": "file",
43+
"url": "https://files.pythonhosted.org/packages/4f/5a/597ef5911cb8919efe4d86206aa8b2658616d676a7088f0825ca08bd7cb8/urllib3-1.26.6.tar.gz",
44+
"sha256": "f57b4c16c62fa2760b7e3d97c35b255512fb6b59a259730f36ba32ce9f8e342f"
45+
},
46+
{
47+
"type": "file",
48+
"url": "https://files.pythonhosted.org/packages/cb/38/4c4d00ddfa48abe616d7e572e02a04273603db446975ab46bbcd36552005/idna-3.2.tar.gz",
49+
"sha256": "467fbad99067910785144ce333826c71fb0e63a425657295239737f7ecd125f3"
50+
},
51+
{
52+
"type": "file",
53+
"url": "https://files.pythonhosted.org/packages/e7/4e/2af0238001648ded297fb54ceb425ca26faa15b341b4fac5371d3938666e/charset-normalizer-2.0.4.tar.gz",
54+
"sha256": "f23667ebe1084be45f6ae0538e4a5a865206544097e4e8bbcacf42cd02a348f3"
55+
},
56+
{
57+
"type": "file",
58+
"url": "https://files.pythonhosted.org/packages/6d/78/f8db8d57f520a54f0b8a438319c342c61c22759d8f9a1cd2e2180b5e5ea9/certifi-2021.5.30.tar.gz",
59+
"sha256": "2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee"
60+
},
61+
{
62+
"type": "file",
63+
"url": "https://files.pythonhosted.org/packages/e7/01/3569e0b535fb2e4a6c384bdbed00c55b9d78b5084e0fb7f4d0bf523d7670/requests-2.26.0.tar.gz",
64+
"sha256": "b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7"
65+
}
66+
]
2967
},
3068
{
3169
"name": "python3-pyxdg",
3270
"buildsystem": "simple",
3371
"build-commands": [
3472
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"pyxdg\" --no-build-isolation"
3573
],
36-
"sources": []
74+
"sources": [
75+
{
76+
"type": "file",
77+
"url": "https://files.pythonhosted.org/packages/6f/2e/2251b5ae2f003d865beef79c8fcd517e907ed6a69f58c32403cec3eba9b2/pyxdg-0.27.tar.gz",
78+
"sha256": "80bd93aae5ed82435f20462ea0208fb198d8eec262e831ee06ce9ddb6b91c5a5"
79+
}
80+
]
3781
}
3882
]
3983
}

0 commit comments

Comments
 (0)