Skip to content

Commit 0802683

Browse files
committed
chore: move build commands out of Flatpak manifest
1 parent c1728f8 commit 0802683

File tree

6 files changed

+101
-107
lines changed

6 files changed

+101
-107
lines changed

justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ generate-flatpak-python3-modules:
2727
pip install requirements-parser PyYAML
2828

2929

30-
curl -L -o "${TEMP_DIR}/flatpak-pip-generator" https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/pip/flatpak-pip-generator
30+
curl -L -o "${TEMP_DIR}/flatpak-pip-generator" https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/pip/flatpak-pip-generator.py
3131
chmod +x "${TEMP_DIR}/flatpak-pip-generator"
3232

33-
${TEMP_DIR}/flatpak-pip-generator --yaml --checker-data --cleanup scripts requests tomli xdg-base-dirs
33+
${TEMP_DIR}/flatpak-pip-generator --yaml --checker-data --cleanup scripts requests tomli xdg-base-dirs poetry-core
3434

3535
deactivate
3636
rm -rf "${TEMP_DIR}"

packaging/land.arcana.TarotCanvas.flathub.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ base: com.riverbankcomputing.PyQt.BaseApp
66
base-version: '6.10'
77
command: tarot-canvas
88
finish-args:
9-
- --share=network # Needed to download reference decks
9+
- --share=network # Needed to download reference decks
1010
- --socket=wayland
1111
- --socket=fallback-x11
1212
- --share=ipc
@@ -16,18 +16,12 @@ modules:
1616
- name: tarot-canvas
1717
buildsystem: simple
1818
build-commands:
19-
- |
20-
PYTHON_VERSION=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')") && \
21-
SITE_PACKAGES="${FLATPAK_DEST}/lib/python${PYTHON_VERSION}/site-packages" && \
22-
mkdir -p ${SITE_PACKAGES} && \
23-
cp -r tarot_canvas ${SITE_PACKAGES}/
24-
19+
- pip3 install --no-deps --no-build-isolation --prefix=${FLATPAK_DEST} .
2520
- install -Dm644 packaging/land.arcana.TarotCanvas.desktop ${FLATPAK_DEST}/share/applications/land.arcana.TarotCanvas.desktop
2621
- install -Dm644 packaging/icon.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/land.arcana.TarotCanvas.svg
2722
- install -Dm644 packaging/land.arcana.TarotCanvas.appdata.xml ${FLATPAK_DEST}/share/metainfo/land.arcana.TarotCanvas.metainfo.xml
28-
- install -Dm755 packaging/tarot-canvas-launcher.sh ${FLATPAK_DEST}/bin/tarot-canvas
2923

3024
sources:
3125
- type: archive
32-
url: https://github.com/arcanaland/tarot-canvas/releases/download/v1.1.0/tarot-canvas-1.1.0.tar.gz
33-
sha256: bdd276123991744fd208a09f5e5e30dcdb76c4538c2fd58312ce84cbb814e6d8
26+
url: https://github.com/arcanaland/tarot-canvas/releases/download/v1.1.1/tarot-canvas-1.1.1.tar.gz
27+
sha256: 5a48f3070c363a2fd21715d04424bed730cf958f6718e658fd56049631519bd6

packaging/land.arcana.TarotCanvas.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ base: com.riverbankcomputing.PyQt.BaseApp
66
base-version: '6.10'
77
command: tarot-canvas
88
finish-args:
9-
- --share=network # Needed to download reference decks
9+
- --share=network # Needed to download reference decks
1010
- --socket=wayland
1111
- --socket=fallback-x11
1212
- --share=ipc
@@ -16,21 +16,10 @@ modules:
1616
- name: tarot-canvas
1717
buildsystem: simple
1818
build-commands:
19-
- |
20-
PYTHON_VERSION=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')") && \
21-
SITE_PACKAGES="${FLATPAK_DEST}/lib/python${PYTHON_VERSION}/site-packages" && \
22-
mkdir -p ${SITE_PACKAGES} && \
23-
cp -r tarot_canvas ${SITE_PACKAGES}/
24-
25-
- mkdir -p ${FLATPAK_DEST}/bin
26-
- mkdir -p ${FLATPAK_DEST}/share/applications
27-
- mkdir -p ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps
28-
- mkdir -p ${FLATPAK_DEST}/share/metainfo
29-
19+
- pip3 install --no-deps --no-build-isolation --prefix=${FLATPAK_DEST} .
3020
- install -Dm644 packaging/land.arcana.TarotCanvas.desktop ${FLATPAK_DEST}/share/applications/land.arcana.TarotCanvas.desktop
31-
- install -Dm644 packaging/icon.png ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/land.arcana.TarotCanvas.png
21+
- install -Dm644 packaging/icon.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/land.arcana.TarotCanvas.svg
3222
- install -Dm644 packaging/land.arcana.TarotCanvas.appdata.xml ${FLATPAK_DEST}/share/metainfo/land.arcana.TarotCanvas.metainfo.xml
33-
- install -Dm755 packaging/tarot-canvas-launcher.sh ${FLATPAK_DEST}/bin/tarot-canvas
3423

3524
sources:
3625
- type: dir

packaging/python3-modules.yaml

Lines changed: 91 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,95 @@
1-
# Generated with flatpak-pip-generator --yaml --checker-data --cleanup scripts requests tomli xdg-base-dirs
1+
# Generated with flatpak-pip-generator --yaml --checker-data --cleanup scripts requests tomli xdg-base-dirs poetry-core
22
build-commands: []
33
buildsystem: simple
44
modules:
5-
- name: python3-requests
6-
buildsystem: simple
7-
build-commands:
8-
- pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}"
9-
--prefix=${FLATPAK_DEST} "requests" --no-build-isolation
10-
sources:
11-
- type: file
12-
url: https://files.pythonhosted.org/packages/4a/7e/3db2bd1b1f9e95f7cddca6d6e75e2f2bd9f51b1246e546d88addca0106bd/certifi-2025.4.26-py3-none-any.whl
13-
sha256: 30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3
14-
x-checker-data:
15-
name: certifi
16-
packagetype: bdist_wheel
17-
type: pypi
18-
- type: file
19-
url: https://files.pythonhosted.org/packages/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz
20-
sha256: 5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63
21-
x-checker-data:
22-
name: charset_normalizer
23-
type: pypi
24-
- type: file
25-
url: https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl
26-
sha256: 946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3
27-
x-checker-data:
28-
name: idna
29-
packagetype: bdist_wheel
30-
type: pypi
31-
- type: file
32-
url: https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl
33-
sha256: 70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6
34-
x-checker-data:
35-
name: requests
36-
packagetype: bdist_wheel
37-
type: pypi
38-
- type: file
39-
url: https://files.pythonhosted.org/packages/6b/11/cc635220681e93a0183390e26485430ca2c7b5f9d33b15c74c2861cb8091/urllib3-2.4.0-py3-none-any.whl
40-
sha256: 4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813
41-
x-checker-data:
42-
name: urllib3
43-
packagetype: bdist_wheel
44-
type: pypi
45-
cleanup:
46-
- /bin
47-
- /share/man/man1
48-
- name: python3-tomli
49-
buildsystem: simple
50-
build-commands:
51-
- pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}"
52-
--prefix=${FLATPAK_DEST} "tomli" --no-build-isolation
53-
sources:
54-
- type: file
55-
url: https://files.pythonhosted.org/packages/18/87/302344fed471e44a87289cf4967697d07e532f2421fdaf868a303cbae4ff/tomli-2.2.1.tar.gz
56-
sha256: cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff
57-
x-checker-data:
58-
name: tomli
59-
type: pypi
60-
cleanup:
61-
- /bin
62-
- /share/man/man1
63-
- name: python3-xdg-base-dirs
64-
buildsystem: simple
65-
build-commands:
66-
- pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}"
67-
--prefix=${FLATPAK_DEST} "xdg-base-dirs" --no-build-isolation
68-
sources:
69-
- type: file
70-
url: https://files.pythonhosted.org/packages/fc/03/030b47fd46b60fc87af548e57ff59c2ca84b2a1dadbe721bb0ce33896b2e/xdg_base_dirs-6.0.2-py3-none-any.whl
71-
sha256: 3c01d1b758ed4ace150ac960ac0bd13ce4542b9e2cdf01312dcda5012cfebabe
72-
x-checker-data:
73-
name: xdg_base_dirs
74-
packagetype: bdist_wheel
75-
type: pypi
76-
cleanup:
77-
- /bin
78-
- /share/man/man1
5+
- name: python3-requests
6+
buildsystem: simple
7+
build-commands:
8+
- pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}"
9+
--prefix=${FLATPAK_DEST} "requests" --no-build-isolation
10+
sources:
11+
- type: file
12+
url: https://files.pythonhosted.org/packages/70/7d/9bc192684cea499815ff478dfcdc13835ddf401365057044fb721ec6bddb/certifi-2025.11.12-py3-none-any.whl
13+
sha256: 97de8790030bbd5c2d96b7ec782fc2f7820ef8dba6db909ccf95449f2d062d4b
14+
x-checker-data:
15+
name: certifi
16+
packagetype: bdist_wheel
17+
type: pypi
18+
- type: file
19+
url: https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz
20+
sha256: 94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a
21+
x-checker-data:
22+
name: charset_normalizer
23+
type: pypi
24+
- type: file
25+
url: https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl
26+
sha256: 771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea
27+
x-checker-data:
28+
name: idna
29+
packagetype: bdist_wheel
30+
type: pypi
31+
- type: file
32+
url: https://files.pythonhosted.org/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl
33+
sha256: 2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6
34+
x-checker-data:
35+
name: requests
36+
packagetype: bdist_wheel
37+
type: pypi
38+
- type: file
39+
url: https://files.pythonhosted.org/packages/a7/c2/fe1e52489ae3122415c51f387e221dd0773709bad6c6cdaa599e8a2c5185/urllib3-2.5.0-py3-none-any.whl
40+
sha256: e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc
41+
x-checker-data:
42+
name: urllib3
43+
packagetype: bdist_wheel
44+
type: pypi
45+
cleanup:
46+
- /bin
47+
- /share/man/man1
48+
- name: python3-tomli
49+
buildsystem: simple
50+
build-commands:
51+
- pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}"
52+
--prefix=${FLATPAK_DEST} "tomli" --no-build-isolation
53+
sources:
54+
- type: file
55+
url: https://files.pythonhosted.org/packages/52/ed/3f73f72945444548f33eba9a87fc7a6e969915e7b1acc8260b30e1f76a2f/tomli-2.3.0.tar.gz
56+
sha256: 64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549
57+
x-checker-data:
58+
name: tomli
59+
type: pypi
60+
cleanup:
61+
- /bin
62+
- /share/man/man1
63+
- name: python3-xdg-base-dirs
64+
buildsystem: simple
65+
build-commands:
66+
- pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}"
67+
--prefix=${FLATPAK_DEST} "xdg-base-dirs" --no-build-isolation
68+
sources:
69+
- type: file
70+
url: https://files.pythonhosted.org/packages/fc/03/030b47fd46b60fc87af548e57ff59c2ca84b2a1dadbe721bb0ce33896b2e/xdg_base_dirs-6.0.2-py3-none-any.whl
71+
sha256: 3c01d1b758ed4ace150ac960ac0bd13ce4542b9e2cdf01312dcda5012cfebabe
72+
x-checker-data:
73+
name: xdg_base_dirs
74+
packagetype: bdist_wheel
75+
type: pypi
76+
cleanup:
77+
- /bin
78+
- /share/man/man1
79+
- name: python3-poetry-core
80+
buildsystem: simple
81+
build-commands:
82+
- pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}"
83+
--prefix=${FLATPAK_DEST} "poetry-core" --no-build-isolation
84+
sources:
85+
- type: file
86+
url: https://files.pythonhosted.org/packages/c7/d8/bb2f602f5e012e177e1c8560125f9770945d36622595990cf1cb794477c2/poetry_core-2.2.1-py3-none-any.whl
87+
sha256: bdfce710edc10bfcf9ab35041605c480829be4ab23f5bc01202cfe5db8f125ab
88+
x-checker-data:
89+
name: poetry_core
90+
packagetype: bdist_wheel
91+
type: pypi
92+
cleanup:
93+
- /bin
94+
- /share/man/man1
7995
name: python3-modules

packaging/tarot-canvas-launcher.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ description = "A cross-platform Qt6 application for viewing and exploring tarot
99
authors = ["Adam Fidel <[email protected]>"]
1010
readme = "README.md"
1111
packages = [{include = "tarot_canvas"}] # This directly uses the tarot_canvas directory at the project root
12+
include = ["tarot_canvas/resources/**/*"]
1213
license = "MIT"
1314
homepage = "https://github.com/arcanaland/tarot-canvas"
1415
repository = "https://github.com/arcanaland/tarot-canvas"

0 commit comments

Comments
 (0)