Skip to content

Commit e746434

Browse files
cosmo-rayjerome-jutteau
authored andcommitted
fix to use the good python version
Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
1 parent 4eee711 commit e746434

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

pkg/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ osc-cli.AppDir/done: $(PY_TARGET)
1414
mv squashfs-root osc-cli.AppDir
1515
rm osc-cli.AppDir/usr/bin/python$(PY_VER)
1616
cd osc-cli.AppDir/usr/bin/ && ln -s ../../opt/$(PY_STR)/bin/$(PY_STR) $(PY_STR)
17+
echo 'export PY_VERSION=$(PY_VER)' > osc-cli.AppDir/py_version.sh
18+
echo 'export PY_STR=$(PY_STR)' >> osc-cli.AppDir/py_version.sh
1719
cp linux/AppRun-py osc-cli.AppDir/AppRun-py
1820
cd .. && APPDIR=$${PWD}/pkg/osc-cli.AppDir/ ./pkg/osc-cli.AppDir/AppRun-py ./setup.py install --prefix=./pkg/osc-cli.AppDir/opt/$(PY_STR)/ --optimize=1
1921
cd osc-cli.AppDir/ && \
@@ -22,8 +24,6 @@ osc-cli.AppDir/done: $(PY_TARGET)
2224
; done
2325
rm osc-cli.AppDir/$(PY_STR).$(PY_MIN).desktop
2426
cp linux/osc-cli.desktop osc-cli.AppDir/
25-
echo 'export PY_VERSION=$(PY_VER)' > osc-cli.AppDir/py_version.sh
26-
echo 'export PY_STR=$(PY_STR)' >> osc-cli.AppDir/py_version.sh
2727
rm osc-cli.AppDir/AppRun
2828
cp linux/AppRun osc-cli.AppDir/
2929
chmod +x osc-cli.AppDir/AppRun

pkg/linux/AppRun-py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#! /bin/bash
22

3+
self="$(readlink -f -- $0)"
4+
here="${self%/*}"
5+
APPDIR="${APPDIR:-${here}}"
6+
7+
source "${APPDIR}/py_version.sh"
8+
39
# Resolve the calling command (preserving symbolic links).
410
export APPIMAGE_COMMAND="$(command -v -- $ARGV0)"
511

@@ -12,4 +18,4 @@ export TKPATH="${TK_LIBRARY}"
1218
export SSL_CERT_FILE="${APPDIR}/opt/_internal/certs.pem"
1319

1420
# Call Python
15-
"$APPDIR/opt/python3.11/bin/python3.11" "$@"
21+
"$APPDIR/opt/$PY_STR/bin/$PY_STR" "$@"

0 commit comments

Comments
 (0)