appimage build: bump python 3.7.10->3.8.12
This commit is contained in:
@@ -8,4 +8,4 @@ export LD_LIBRARY_PATH="${APPDIR}/usr/lib/:${APPDIR}/usr/lib/x86_64-linux-gnu${L
|
|||||||
export PATH="${APPDIR}/usr/bin:${PATH}"
|
export PATH="${APPDIR}/usr/bin:${PATH}"
|
||||||
export LDFLAGS="-L${APPDIR}/usr/lib/x86_64-linux-gnu -L${APPDIR}/usr/lib"
|
export LDFLAGS="-L${APPDIR}/usr/lib/x86_64-linux-gnu -L${APPDIR}/usr/lib"
|
||||||
|
|
||||||
exec "${APPDIR}/usr/bin/python3.7" -s "${APPDIR}/usr/bin/electrum" "$@"
|
exec "${APPDIR}/usr/bin/python3.8" -s "${APPDIR}/usr/bin/electrum" "$@"
|
||||||
|
|||||||
@@ -14,9 +14,7 @@ PIP_CACHE_DIR="$CACHEDIR/pip_cache"
|
|||||||
export GCC_STRIP_BINARIES="1"
|
export GCC_STRIP_BINARIES="1"
|
||||||
|
|
||||||
# pinned versions
|
# pinned versions
|
||||||
# note: compiling python 3.8.x requires at least glibc 2.27,
|
PYTHON_VERSION=3.8.12
|
||||||
# which is first available on ubuntu 18.04
|
|
||||||
PYTHON_VERSION=3.7.10
|
|
||||||
PKG2APPIMAGE_COMMIT="eb8f3acdd9f11ab19b78f5cb15daa772367daf15"
|
PKG2APPIMAGE_COMMIT="eb8f3acdd9f11ab19b78f5cb15daa772367daf15"
|
||||||
SQUASHFSKIT_COMMIT="ae0d656efa2d0df2fcac795b6823b44462f19386"
|
SQUASHFSKIT_COMMIT="ae0d656efa2d0df2fcac795b6823b44462f19386"
|
||||||
|
|
||||||
@@ -41,7 +39,7 @@ download_if_not_exist "$CACHEDIR/appimagetool" "https://github.com/AppImage/AppI
|
|||||||
verify_hash "$CACHEDIR/appimagetool" "d918b4df547b388ef253f3c9e7f6529ca81a885395c31f619d9aaf7030499a13"
|
verify_hash "$CACHEDIR/appimagetool" "d918b4df547b388ef253f3c9e7f6529ca81a885395c31f619d9aaf7030499a13"
|
||||||
|
|
||||||
download_if_not_exist "$CACHEDIR/Python-$PYTHON_VERSION.tar.xz" "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz"
|
download_if_not_exist "$CACHEDIR/Python-$PYTHON_VERSION.tar.xz" "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz"
|
||||||
verify_hash "$CACHEDIR/Python-$PYTHON_VERSION.tar.xz" "f8d82e7572c86ec9d55c8627aae5040124fd2203af400c383c821b980306ee6b"
|
verify_hash "$CACHEDIR/Python-$PYTHON_VERSION.tar.xz" "b1d3a76420375343b5e8a22fceb1ac65b77193e9ed27146524f0a9db058728ea"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -51,8 +49,8 @@ tar xf "$CACHEDIR/Python-$PYTHON_VERSION.tar.xz" -C "$BUILDDIR"
|
|||||||
cd "$BUILDDIR/Python-$PYTHON_VERSION"
|
cd "$BUILDDIR/Python-$PYTHON_VERSION"
|
||||||
LC_ALL=C export BUILD_DATE=$(date -u -d "@$SOURCE_DATE_EPOCH" "+%b %d %Y")
|
LC_ALL=C export BUILD_DATE=$(date -u -d "@$SOURCE_DATE_EPOCH" "+%b %d %Y")
|
||||||
LC_ALL=C export BUILD_TIME=$(date -u -d "@$SOURCE_DATE_EPOCH" "+%H:%M:%S")
|
LC_ALL=C export BUILD_TIME=$(date -u -d "@$SOURCE_DATE_EPOCH" "+%H:%M:%S")
|
||||||
# Patch taken from Ubuntu http://archive.ubuntu.com/ubuntu/pool/main/p/python3.7/python3.7_3.7.6-1.debian.tar.xz
|
# Patch taken from Ubuntu http://archive.ubuntu.com/ubuntu/pool/main/p/python3.8/python3.8_3.8.5-1~20.04.debian.tar.xz
|
||||||
patch -p1 < "$CONTRIB_APPIMAGE/patches/python-3.7-reproducible-buildinfo.diff"
|
patch -p1 < "$CONTRIB_APPIMAGE/patches/python-3.8-reproducible-buildinfo.diff"
|
||||||
./configure \
|
./configure \
|
||||||
--cache-file="$CACHEDIR/python.config.cache" \
|
--cache-file="$CACHEDIR/python.config.cache" \
|
||||||
--prefix="$APPDIR/usr" \
|
--prefix="$APPDIR/usr" \
|
||||||
@@ -66,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
|
# to result in a different output on macOS compared to Linux. We simply patch
|
||||||
# sysconfigdata to remove the extension.
|
# sysconfigdata to remove the extension.
|
||||||
# Some more info: https://bugs.python.org/issue27631
|
# Some more info: https://bugs.python.org/issue27631
|
||||||
sed -i -e 's/\.exe//g' "$APPDIR"/usr/lib/python3.7/_sysconfigdata*
|
sed -i -e 's/\.exe//g' "$APPDIR"/usr/lib/python3.8/_sysconfigdata*
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -88,7 +86,7 @@ appdir_python() {
|
|||||||
env \
|
env \
|
||||||
PYTHONNOUSERSITE=1 \
|
PYTHONNOUSERSITE=1 \
|
||||||
LD_LIBRARY_PATH="$APPDIR/usr/lib:$APPDIR/usr/lib/x86_64-linux-gnu${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}" \
|
LD_LIBRARY_PATH="$APPDIR/usr/lib:$APPDIR/usr/lib/x86_64-linux-gnu${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}" \
|
||||||
"$APPDIR/usr/bin/python3.7" "$@"
|
"$APPDIR/usr/bin/python3.8" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
python='appdir_python'
|
python='appdir_python'
|
||||||
@@ -166,7 +164,7 @@ info "finalizing AppDir."
|
|||||||
move_lib
|
move_lib
|
||||||
|
|
||||||
# apply global appimage blacklist to exclude stuff
|
# apply global appimage blacklist to exclude stuff
|
||||||
# move usr/include out of the way to preserve usr/include/python3.7m.
|
# move usr/include out of the way to preserve usr/include/python3.8m.
|
||||||
mv usr/include usr/include.tmp
|
mv usr/include usr/include.tmp
|
||||||
delete_blacklisted
|
delete_blacklisted
|
||||||
mv usr/include.tmp usr/include
|
mv usr/include.tmp usr/include
|
||||||
@@ -189,7 +187,7 @@ strip_binaries()
|
|||||||
{
|
{
|
||||||
chmod u+w -R "$APPDIR"
|
chmod u+w -R "$APPDIR"
|
||||||
{
|
{
|
||||||
printf '%s\0' "$APPDIR/usr/bin/python3.7"
|
printf '%s\0' "$APPDIR/usr/bin/python3.8"
|
||||||
find "$APPDIR" -type f -regex '.*\.so\(\.[0-9.]+\)?$' -print0
|
find "$APPDIR" -type f -regex '.*\.so\(\.[0-9.]+\)?$' -print0
|
||||||
} | xargs -0 --no-run-if-empty --verbose strip -R .note.gnu.build-id -R .comment
|
} | xargs -0 --no-run-if-empty --verbose strip -R .note.gnu.build-id -R .comment
|
||||||
}
|
}
|
||||||
@@ -204,11 +202,11 @@ remove_emptydirs
|
|||||||
|
|
||||||
info "removing some unneeded stuff to decrease binary size."
|
info "removing some unneeded stuff to decrease binary size."
|
||||||
rm -rf "$APPDIR"/usr/{share,include}
|
rm -rf "$APPDIR"/usr/{share,include}
|
||||||
PYDIR="$APPDIR"/usr/lib/python3.7
|
PYDIR="$APPDIR"/usr/lib/python3.8
|
||||||
rm -rf "$PYDIR"/{test,ensurepip,lib2to3,idlelib,turtledemo}
|
rm -rf "$PYDIR"/{test,ensurepip,lib2to3,idlelib,turtledemo}
|
||||||
rm -rf "$PYDIR"/{ctypes,sqlite3,tkinter,unittest}/test
|
rm -rf "$PYDIR"/{ctypes,sqlite3,tkinter,unittest}/test
|
||||||
rm -rf "$PYDIR"/distutils/{command,tests}
|
rm -rf "$PYDIR"/distutils/{command,tests}
|
||||||
rm -rf "$PYDIR"/config-3.7m-x86_64-linux-gnu
|
rm -rf "$PYDIR"/config-3.8m-x86_64-linux-gnu
|
||||||
rm -rf "$PYDIR"/site-packages/{opt,pip,setuptools,wheel}
|
rm -rf "$PYDIR"/site-packages/{opt,pip,setuptools,wheel}
|
||||||
rm -rf "$PYDIR"/site-packages/Cryptodome/SelfTest
|
rm -rf "$PYDIR"/site-packages/Cryptodome/SelfTest
|
||||||
rm -rf "$PYDIR"/site-packages/{psutil,qrcode,websocket}/tests
|
rm -rf "$PYDIR"/site-packages/{psutil,qrcode,websocket}/tests
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
--- a/Makefile.pre.in
|
--- a/Makefile.pre.in
|
||||||
+++ b/Makefile.pre.in
|
+++ b/Makefile.pre.in
|
||||||
@@ -766,6 +766,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
|
@@ -756,6 +756,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
|
||||||
-DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \
|
-DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \
|
||||||
-DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \
|
-DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \
|
||||||
-DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \
|
-DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \
|
||||||
Reference in New Issue
Block a user