core/python to 3.10.1-1

This commit is contained in:
Kevin Mihelich 2021-12-13 00:44:46 +00:00
parent 92f15181d9
commit 03ac11d601
3 changed files with 16 additions and 65 deletions

View file

@ -12,7 +12,7 @@ shopt -s extglob
pkgbase=python
pkgname=(python python-tests)
pkgver=3.9.9
pkgver=3.10.1
pkgrel=1
_pybasever=${pkgver%.*}
pkgdesc="Next generation of the python high-level scripting language"
@ -22,20 +22,19 @@ url="https://www.python.org/"
depends=('bzip2' 'expat' 'gdbm' 'libffi' 'libnsl' 'libxcrypt' 'openssl' 'zlib')
makedepends=('tk' 'sqlite' 'bluez-libs' 'mpdecimal' 'llvm' 'gdb' 'xorg-server-xvfb' 'ttf-font')
source=("https://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz"{,.asc}
mpdecimal-2.5.1.patch)
sha512sums=('0ab29fb9a7ecb808bd08d84d28908d5a934e0f021853da0f7a9c94670eb30c8dbbc233d461afdb3995b0de59275ef7e1de43e82d7f848802cbd6e6e50b7b25a6'
https://bugs.python.org/file50485/cmp_interned_strings.patch)
sha512sums=('1c559e33f1252e51bafb941c380de16f142c0735858363c84cb8dbed6767843de3af126889c2826ffb94bd4777d7cdfc31040301c8c74de56af52b80b1aa9e76'
'SKIP'
'58f683cbfdc6aa84c03d068c1bc2f1d8d2c17ba4f7b632c14ab1d529d8332e767354266c3815e239427497fff1a42ec2a37739ea312d24cb76a69dcf1c98c0ad')
'd97fe57566169bfc06713d4aa420e1c85c0b9c1d0f96d61cdd3a4a86b2340753a80c56e0d48c16b513e3f639cee83b7fbbc0c21045d2f37bf37543048f914557')
validpgpkeys=('0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D' # Ned Deily (Python release signing key) <nad@python.org>
'E3FF2839C048B25C084DEBE9B26995E310250568') # Łukasz Langa (GPG langa.pl) <lukasz@langa.pl>
'E3FF2839C048B25C084DEBE9B26995E310250568' # Łukasz Langa (GPG langa.pl) <lukasz@langa.pl>
'A035C8C19219BA821ECEA86B64E628F8D684696D') # Pablo Galindo Salgado <pablogsal@gmail.com>
prepare() {
cd Python-${pkgver}
patch -p1 -i ../mpdecimal-2.5.1.patch
# https://bugs.python.org/issue41346
sed -i 's/-j0 //' Makefile.pre.in
# FS#72979
patch -Np1 -i ../cmp_interned_strings.patch
# FS#23997
sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py
@ -54,10 +53,7 @@ build() {
cd Python-${pkgver}
# PGO should be done with -O3
# Also included the -fno-semantic-interposition optimization:
# https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup
CFLAGS="${CFLAGS/-O2/-O3} -fno-semantic-interposition"
LDFLAGS="$LDFLAGS -fno-semantic-interposition"
CFLAGS="${CFLAGS/-O2/-O3}"
# Disable bundled pip & setuptools
./configure --prefix=/usr \
@ -81,7 +77,9 @@ build() {
}
check() {
# test_tk and test_ttk_guionly: https://bugs.python.org/issue43139
# test_socket: test.test_socket.RDSTest.testPeek hangs https://bugs.python.org/issue35247
# test_tk: tkinter.test.test_tkinter.test_colorchooser.DefaultRootTest hangs
# test_ttk_guionly: test failures about "AssertionError: TclError not raised"
cd Python-${pkgver}
@ -91,7 +89,7 @@ check() {
LD_LIBRARY_PATH="${srcdir}/Python-${pkgver}":${LD_LIBRARY_PATH} \
LC_CTYPE=en_US.UTF-8 xvfb-run -s "-screen 0 1920x1080x16 -ac +extension GLX" -a -n "$servernum" \
"${srcdir}/Python-${pkgver}/python" -m test.regrtest -v -uall -x test_tk -x test_ttk_guionly
"${srcdir}/Python-${pkgver}/python" -m test.regrtest -v -uall -x test_socket -x test_tk -x test_ttk_guionly
}
package_python() {

View file

@ -1,14 +1,12 @@
#!/bin/bash
pyver=$(pacman -S --print-format %v python | grep -oP '^[0-9]+\.[0-9]+')
exclude=('python2' 'python2-.*' 'pypy3\?' 'cython2' 'cuda' 'metasploit'
'mysql-workbench' 'ntop' 'dia' 'ghidra' 'kross-interpreters'
'kodi-gbm' 'kodi-wayland' 'kodi-x11')
exclude=('python2' 'python2-.*' 'pypy3\?' 'cython2' 'cuda' 'cuda-tools'
'metasploit' 'dia' 'ghidra' 'kross-interpreters')
{
pacman -Fq /usr/lib/python${pyver}/ | grep -v archlinuxcn | cut -d / -f 2
pacman -Fxq "\.cpython-${pyver/.}.pyc$" | grep -v archlinuxcn | cut -d / -f 2
sogrep all libpython${pyver}.so
ssh dragon.archlinux.org "parallel \"zstdgrep -q 'Py_Initialize\|PyInit_\|PyModule_Create2' {} && pacman -Qpq {}\" ::: /srv/ftp/pool/*/*.zst"
ssh dragon.archlinux.org "parallel \"xzgrep -q 'Py_Initialize\|PyInit_\|PyModule_Create2' {} && pacman -Qpq {}\" ::: /srv/ftp/pool/*/*.xz"
ssh build.archlinux.org "parallel \"zstdgrep -q 'Py_Initialize\|PyInit_\|PyModule_Create2' {} && pacman -Qpq {}\" ::: /srv/ftp/pool/*/*.zst"
} | grep -xvf <(printf "%s\n" "${exclude[@]}") | sort -u

View file

@ -1,45 +0,0 @@
From dd436be488bdca2123d12d1e148d85cb6f98be5f Mon Sep 17 00:00:00 2001
From: Stefan Krah <skrah@bytereef.org>
Date: Sun, 10 Jan 2021 16:35:48 +0100
Subject: [PATCH] Portability fixes.
---
Modules/_decimal/_decimal.c | 4 ++--
setup.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
index 664d45a90481d..bbd540bc376e2 100644
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -3295,7 +3295,7 @@ dec_format(PyObject *dec, PyObject *args)
}
else {
size_t n = strlen(spec.dot);
- if (n > 1 || (n == 1 && !isascii((uchar)spec.dot[0]))) {
+ if (n > 1 || (n == 1 && !isascii((unsigned char)spec.dot[0]))) {
/* fix locale dependent non-ascii characters */
dot = dotsep_as_utf8(spec.dot);
if (dot == NULL) {
@@ -3304,7 +3304,7 @@ dec_format(PyObject *dec, PyObject *args)
spec.dot = PyBytes_AS_STRING(dot);
}
n = strlen(spec.sep);
- if (n > 1 || (n == 1 && !isascii((uchar)spec.sep[0]))) {
+ if (n > 1 || (n == 1 && !isascii((unsigned char)spec.sep[0]))) {
/* fix locale dependent non-ascii characters */
sep = dotsep_as_utf8(spec.sep);
if (sep == NULL) {
diff --git a/setup.py b/setup.py
index ddc0bd067d4e4..c547a68664e8c 100644
--- a/setup.py
+++ b/setup.py
@@ -2199,7 +2199,7 @@ def detect_decimal(self):
undef_macros = []
if '--with-system-libmpdec' in sysconfig.get_config_var("CONFIG_ARGS"):
include_dirs = []
- libraries = [':libmpdec.so.2']
+ libraries = ['mpdec']
sources = ['_decimal/_decimal.c']
depends = ['_decimal/docstrings.h']
else: