tools: Port in-build-gimp.sh to Python

Both .sh and .py versions take 2:15 minutes to generate all the
assets but the more cross platform the better so Python wins.
This commit is contained in:
Bruno Lopes 2025-04-16 12:33:19 -03:00
parent f5ee454098
commit 99bf8defe7
No known key found for this signature in database
5 changed files with 83 additions and 86 deletions

View file

@ -10,4 +10,4 @@ cmd="import os; import sys; sys.path.insert(0, '$SRC_DIR'); from pygimp.utils im
cmd="$cmd proc = Gimp.get_pdb().lookup_procedure('$TEST_NAME'); gimp_c_assert('$TEST_FILE', 'Test PDB procedure does not exist: {}'.format('$TEST_NAME'), proc is not None);"
cmd="$cmd result = proc.run(None);"
cmd="$cmd print('SUCCESS') if result.index(0) == Gimp.PDBStatusType.SUCCESS else gimp_c_assert('$TEST_FILE', result.index(1), False);"
echo "$cmd" | "$GIMP_EXE" -nis --batch-interpreter "python-fu-eval" -b - --quit
echo "$cmd" | python3 "$GIMP_EXE" -nis --batch-interpreter "python-fu-eval" -b - --quit

View file

@ -24,4 +24,4 @@ fi
header="import os; import sys; sys.path.insert(0, '$SRC_DIR'); from pygimp.utils import gimp_assert;"
header="$header import pygimp.utils; pygimp.utils.gimp_test_filename = '$TEST_FILE'"
(echo "$header" && tail -n +2 "$TEST_FILE") | "$GIMP_EXE" -nis --batch-interpreter "python-fu-eval" -b - --quit
(echo "$header" && tail -n +2 "$TEST_FILE") | python3 "$GIMP_EXE" -nis --batch-interpreter "python-fu-eval" -b - --quit