aboutsummaryrefslogtreecommitdiffstats
path: root/main/python3/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/python3/APKBUILD')
-rw-r--r--main/python3/APKBUILD56
1 files changed, 31 insertions, 25 deletions
diff --git a/main/python3/APKBUILD b/main/python3/APKBUILD
index 3e5f286189..8635786f9e 100644
--- a/main/python3/APKBUILD
+++ b/main/python3/APKBUILD
@@ -1,21 +1,20 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
-# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Contributor: Sheila Aman <sheila@vulpine.house>
pkgname=python3
# the python3-tkinter's pkgver needs to be synchronized with this.
-pkgver=3.8.7
-_bluez_ver=5.54
+pkgver=3.9.5
+_bluez_ver=5.55
_basever="${pkgver%.*}"
-pkgrel=3
+pkgrel=1
pkgdesc="A high-level scripting language"
url="https://www.python.org/"
arch="all"
license="PSF-2.0"
-subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc $pkgname-tests::noarch
- $pkgname-wininst"
+subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc $pkgname-tests::noarch"
makedepends="expat-dev openssl-dev zlib-dev ncurses-dev bzip2-dev xz-dev
sqlite-dev libffi-dev tcl-dev linux-headers gdbm-dev>=1.18.1-r0 readline-dev
- mpdecimal-dev automake autoconf libtool !gettext-dev"
+ mpdecimal-dev automake autoconf libtool autoconf-archive !gettext-dev"
source="https://www.python.org/ftp/python/$pkgver/Python-$pkgver.tar.xz
https://www.kernel.org/pub/linux/bluetooth/bluez-$_bluez_ver.tar.xz
fix-xattrs-glibc.patch
@@ -23,12 +22,14 @@ source="https://www.python.org/ftp/python/$pkgver/Python-$pkgver.tar.xz
custom-bluetooth-h-path.patch
arm-alignment.patch
mpdecimal-2.5.1.patch
- test_nntplib.patch
- ece5dfd403dac211f8d3c72701fe7ba7b7aa5b5f.patch
+ bpo-43112.patch
"
+options="net" # Required for tests
builddir="$srcdir/Python-$pkgver"
# secfixes:
+# 3.8.8-r0:
+# - CVE-2021-23336
# 3.8.7-r2:
# - CVE-2021-3177
# 3.8.5-r0:
@@ -54,6 +55,9 @@ prepare() {
mv "$srcdir"/bluez-$_bluez_ver/lib "$srcdir"/bluez-$_bluez_ver/bluetooth
+ # Speed up LTO
+ sed -i -e "s|-flto |-flto=4 |g" configure configure.ac
+
autoreconf -fi
sed "s|@bluetoothdir@|\"$srcdir/bluez-$_bluez_ver\"|g" -i setup.py
@@ -68,8 +72,9 @@ build() {
# link against bluez. Depending on bluez-dev introduces a circular dep:
# Python -> bluez -> glib -> meson -> python
./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
--prefix=/usr \
- --disable-rpath \
--enable-ipv6 \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
@@ -80,13 +85,17 @@ build() {
--with-system-expat \
--with-system-ffi \
--with-system-libmpdec \
- --with-threads \
--without-ensurepip \
--with-bluetoothdir="$srcdir/bluez-$_bluez_ver"
# set thread stack size to 1MB so we don't segfault before we hit
# sys.getrecursionlimit()
- make EXTRA_CFLAGS="$CFLAGS -DTHREAD_STACK_SIZE=0x100000"
+ # s390x needs more stack space due to its calling convention
+ local stacksize=0x100000
+ case "$CARCH" in
+ s390x) stacksize=0x200000;;
+ esac
+ make EXTRA_CFLAGS="$CFLAGS -DTHREAD_STACK_SIZE=$stacksize"
}
check() {
@@ -129,6 +138,9 @@ EOF
fail="$fail test_multiprocessing_main_handling" # fails on x86_64
fail="$fail test_runpy" # fails on x86_64
fail="$fail test_threading" # hangs on all arches (except x86_64?)
+ fail="$fail test_selectors" # AssertionError: 'Python' not found in '' (python3.9)
+ fail="$fail test_nntplib"
+ fail="$fail test_asyncio" # hangs; routinely problematic (e.g. bpo-39101, bpo-41891, bpo-42183)
# kernel related
fail="$fail test_fcntl" # wants DNOTIFY, we don't have it
@@ -181,19 +193,13 @@ tests() {
"$subpkgdir"/usr/lib/python$_basever/
}
-wininst() {
- pkgdesc="Python wininst files"
- mkdir -p "$subpkgdir"/usr/lib/python$_basever/distutils/command
- mv "$pkgdir"/usr/lib/python$_basever/distutils/command/*.exe \
- "$subpkgdir"/usr/lib/python$_basever/distutils/command
-}
-
-sha512sums="6a27d8eab3076930df46b0cf127f9b664f8d4147349b2b98132f464deb7f69d87e0167e8ee8e6c64249125ad73760d965ecbc81c252b63a1e7aac95594c62b74 Python-3.8.7.tar.xz
-e19d15d3a478a7af47c1921c8827843492e38787b1182152155bd3d8ad9e1d8ee25c5fda1f24e38c54ebbf946b09fe75007dca9a24d1c35f73303558e558dcbe bluez-5.54.tar.xz
-37b6ee5d0d5de43799316aa111423ba5a666c17dc7f81b04c330f59c1d1565540eac4c585abe2199bbed52ebe7426001edb1c53bd0a17486a2a8e052d0f494ad fix-xattrs-glibc.patch
+sha512sums="
+7b581af1b3e73695f124ff6a3a960e22104153a5d920ca930c046f42ea313b1e7ec77e39876db2bf5d5da6d7412cb072ff8ae7814dda12c14f9da6c570fb0995 Python-3.9.5.tar.xz
+9423cb60d15a6f068838497a1eaea9f5a32d70c07191c313ba821a6919d6e0c436ada4f547cc5f2db5eacc0123429ad54851f57df2554f61fa293743ec14a033 bluez-5.55.tar.xz
+fe123dd871f7a3fa868c499a957b94f1d815a1e1de964aaff1116c579defd4d9d1e9b7eb418cf114b169b97426ed603bf4b1e61b45ec483df06abe988c6a30ee fix-xattrs-glibc.patch
ab8eaa2858d5109049b1f9f553198d40e0ef8d78211ad6455f7b491af525bffb16738fed60fc84e960c4889568d25753b9e4a1494834fea48291b33f07000ec2 musl-find_library.patch
-d489b5d5f374e2b298954a2388771e500c6cf9b274012e06b3e71a34aa85c354369b3fa2a37c3121808075c1f1f340a9fa097996c149399e10b9424170211d90 custom-bluetooth-h-path.patch
+6b04a779f0aaf243d398fe28207a7257d74e6fb0487b05fbb6bf56d4f1b842714f51fcb4953214b25c7552d688e8b98d2ef63ef6c29ebed194b9a80870db2d98 custom-bluetooth-h-path.patch
a84483246e413650a904c34c18f5e4f4168c39067d069f48557c330de6eb3db19fd96a4d453d742db3dcb7c7f962722903f62823c752ff90510c89830435ffc0 arm-alignment.patch
d95e36ef3c315a2ddf689c9319e027cf56e8817b0cae139e3ade4742ab6f9efcb3cc4adca178e9bbc8757bd0e3fb924ac2b37e66e70eaa7288202a25339eed7d mpdecimal-2.5.1.patch
-f0b2da4937cac618c40b9e2b6e332de321cd6d292820f11a74122a6c1440f4dadc73dead6a1cf07ea54af3c4db66e0ba38af83f139f7d5f77d479c179376139d test_nntplib.patch
-62b9b25c40e1fe2bfd068cfa056fb7a0a8d5ef1b00256a216efbaa7c36c2fc2f292e20776ccf7c43affb427232b2e6b9348845076e29f9621e48b06fc13e29e2 ece5dfd403dac211f8d3c72701fe7ba7b7aa5b5f.patch"
+68a3b0bc270e4f7ec8593945c8c891fab988489f4ba9ee78a0e4351df0699db16dfad7d374f13758c80962b0cea048ff577c0462857cd13919d6cefa1f6a382f bpo-43112.patch
+"