|
|
|
|
@ -15,6 +15,7 @@ export GCC_STRIP_BINARIES="1"
|
|
|
|
|
|
|
|
|
|
# pinned versions |
|
|
|
|
PYTHON_VERSION=3.9.11 |
|
|
|
|
PY_VER_MAJOR="3.9" # as it appears in fs paths |
|
|
|
|
PKG2APPIMAGE_COMMIT="a9c85b7e61a3a883f4a35c41c5decb5af88b6b5d" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -63,7 +64,7 @@ tar xf "$CACHEDIR/Python-$PYTHON_VERSION.tar.xz" -C "$BUILDDIR"
|
|
|
|
|
# to result in a different output on macOS compared to Linux. We simply patch |
|
|
|
|
# sysconfigdata to remove the extension. |
|
|
|
|
# Some more info: https://bugs.python.org/issue27631 |
|
|
|
|
sed -i -e 's/\.exe//g' "$APPDIR"/usr/lib/python3.9/_sysconfigdata* |
|
|
|
|
sed -i -e 's/\.exe//g' "${APPDIR}/usr/lib/python${PY_VER_MAJOR}"/_sysconfigdata* |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -75,7 +76,7 @@ appdir_python() {
|
|
|
|
|
env \ |
|
|
|
|
PYTHONNOUSERSITE=1 \ |
|
|
|
|
LD_LIBRARY_PATH="$APPDIR/usr/lib:$APPDIR/usr/lib/x86_64-linux-gnu${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}" \ |
|
|
|
|
"$APPDIR/usr/bin/python3.9" "$@" |
|
|
|
|
"$APPDIR/usr/bin/python${PY_VER_MAJOR}" "$@" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
python='appdir_python' |
|
|
|
|
@ -159,7 +160,7 @@ info "finalizing AppDir."
|
|
|
|
|
move_lib |
|
|
|
|
|
|
|
|
|
# apply global appimage blacklist to exclude stuff |
|
|
|
|
# move usr/include out of the way to preserve usr/include/python3.9m. |
|
|
|
|
# move usr/include out of the way to preserve usr/include/python${PY_VER_MAJOR}. |
|
|
|
|
mv usr/include usr/include.tmp |
|
|
|
|
delete_blacklisted |
|
|
|
|
mv usr/include.tmp usr/include |
|
|
|
|
@ -182,7 +183,7 @@ strip_binaries()
|
|
|
|
|
{ |
|
|
|
|
chmod u+w -R "$APPDIR" |
|
|
|
|
{ |
|
|
|
|
printf '%s\0' "$APPDIR/usr/bin/python3.9" |
|
|
|
|
printf '%s\0' "$APPDIR/usr/bin/python${PY_VER_MAJOR}" |
|
|
|
|
find "$APPDIR" -type f -regex '.*\.so\(\.[0-9.]+\)?$' -print0 |
|
|
|
|
} | xargs -0 --no-run-if-empty --verbose strip -R .note.gnu.build-id -R .comment |
|
|
|
|
} |
|
|
|
|
@ -197,7 +198,7 @@ remove_emptydirs
|
|
|
|
|
|
|
|
|
|
info "removing some unneeded stuff to decrease binary size." |
|
|
|
|
rm -rf "$APPDIR"/usr/{share,include} |
|
|
|
|
PYDIR="$APPDIR"/usr/lib/python3.9 |
|
|
|
|
PYDIR="$APPDIR/usr/lib/python${PY_VER_MAJOR}" |
|
|
|
|
rm -rf "$PYDIR"/{test,ensurepip,lib2to3,idlelib,turtledemo} |
|
|
|
|
rm -rf "$PYDIR"/{ctypes,sqlite3,tkinter,unittest}/test |
|
|
|
|
rm -rf "$PYDIR"/distutils/{command,tests} |
|
|
|
|
|