Skip to content

Commit f824043

Browse files
committed
Fix installation of linuxdeploy-plugin-native_packages
1 parent 40227c7 commit f824043

File tree

2 files changed

+37
-16
lines changed

2 files changed

+37
-16
lines changed

ci/build.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,16 @@ if [[ "${BUILD_LITE:-}" == "" ]]; then
137137
--output native_packages
138138
)
139139

140-
pipx install git+https://github.com/linuxdeploy/linuxdeploy-plugin-native_packages
140+
# tools like pipx would have side effects on the build host and it's generally a bit overkill for our purpose
141+
if which python3.13 &> /dev/null; then
142+
# python3.13, installed from the deadsnakes PPA for the Docker builds
143+
python3() {
144+
python3.13 "$@"
145+
}
146+
fi
147+
python3 -m venv venv
148+
venv/bin/pip install git+https://github.com/linuxdeploy/linuxdeploy-plugin-native_packages
149+
export PATH="$PWD/venv/bin:$PATH"
141150
else
142151
linuxdeploy_extra_args+=(
143152
--custom-apprun "$REPO_ROOT"/resources/appimagelauncher-lite-AppRun.sh

ci/install-deps.sh

+27-15
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,31 @@ esac
2525

2626
set -x
2727

28+
# this array collects all the packages we want to install
29+
# running as few operations as possible is a runtime optimization
30+
packages=()
31+
32+
# install 32-bit build dependencies and multilib/cross compilers for binfmt-bypass's 32-bit preload library
33+
# must be done before apt-get update, otherwise the packages cannot be found during installation
34+
if [[ "$DOCKER_PLATFORM" == "linux/amd64" ]]; then
35+
dpkg --add-architecture i386
36+
packages+=(
37+
libc6-dev:i386
38+
)
39+
elif [[ "$DOCKER_PLATFORM" == "linux/arm64/v8" ]]; then
40+
dpkg --add-architecture armhf
41+
packages+=(
42+
libc6-dev:armhf
43+
)
44+
fi
45+
46+
# allow setup of PPA
47+
apt-get update
48+
apt-get install -y software-properties-common
49+
50+
# we depend on the deadsnakes PPA to provide a sufficiently recent Python to linuxdeploy-plugin-native_packages
51+
add-apt-repository -y ppa:deadsnakes/ppa
52+
2853
packages=(
2954
libcurl4-openssl-dev
3055
libfuse-dev
@@ -71,26 +96,13 @@ packages=(
7196
libzstd-dev
7297

7398
# linuxdeploy-plugin-native_packages
74-
pipx
99+
# see also above re. deadsnakes PPA
100+
python3.13-venv
75101
)
76102

77-
# install 32-bit build dependencies and multilib/cross compilers for binfmt-bypass's 32-bit preload library
78-
if [[ "$DOCKER_PLATFORM" == "linux/amd64" ]]; then
79-
dpkg --add-architecture i386
80-
packages+=(
81-
libc6-dev:i386
82-
)
83-
elif [[ "$DOCKER_PLATFORM" == "linux/arm64/v8" ]]; then
84-
dpkg --add-architecture armhf
85-
packages+=(
86-
libc6-dev:armhf
87-
)
88-
fi
89-
90103
# headless install
91104
export DEBIAN_FRONTEND=noninteractive
92105

93-
apt-get update
94106
apt-get -y --no-install-recommends install "${packages[@]}"
95107

96108
# install more recent CMake

0 commit comments

Comments
 (0)