-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate-pikepdf
executable file
·22 lines (17 loc) · 1.08 KB
/
generate-pikepdf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# We want to be able to call this script from anywhere but the results should always be in this directory
# Setting the full path with in the generator's -o will result in 'name' of the module being the full path which doesn't work
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
( # contain directory change in subshell
# shellcheck disable=SC2164
cd "${SCRIPT_DIR}"
PIP_GENERATOR="flatpak-builder-tools/pip/flatpak-pip-generator --checker-data --yaml"
# Maybe there are more accurate results with the additional flag: --runtime=org.gnome.Sdk//<version>
# Currently it makes no difference and the GHA workflow becomes unneccessarily complex with flatpaks
# Workaround for pip's keyring bug
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
# lxml must be force installed as it is in the GMOME 41 sdk but not the platform
$PIP_GENERATOR lxml
sed -e 's/--no-build-isolation/--no-build-isolation --ignore-installed/g' -i python3-lxml.yaml
$PIP_GENERATOR pybind11 pikepdf -o python3-pikepdf-internal
)