-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate-pikepdf
More file actions
executable file
·28 lines (21 loc) · 1.4 KB
/
Copy pathgenerate-pikepdf
File metadata and controls
executable file
·28 lines (21 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/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 sdk but not the platform since 41
# Platform issue 'wontfix': https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/380
$PIP_GENERATOR --ignore-installed=lxml lxml
$PIP_GENERATOR --cleanup=all nanobind scikit-build-core pybind11 -o python3-pikepdf-build-dependencies
# While pikepdf moved on to nanobind, pillow still needs pybind11 to build
# not an optdep-group I guess
# $PIP_GENERATOR --optdep-groups=build-system --build-only pikepdf -o pikepdf-build-system
$PIP_GENERATOR pikepdf -o python3-pikepdf-internal
)