[arch-commits] Commit in python/trunk (PKGBUILD mpdecimal-2.5.1.patch)
Felix Yan
felixonmars at archlinux.org
Sat Feb 6 12:59:55 UTC 2021
Date: Saturday, February 6, 2021 @ 12:59:55
Author: felixonmars
Revision: 407560
upgpkg: python 3.9.1-2: rebuild with mpdecimal 2.5.1
Added:
python/trunk/mpdecimal-2.5.1.patch
Modified:
python/trunk/PKGBUILD
-----------------------+
PKGBUILD | 20 ++++++++++++++++----
mpdecimal-2.5.1.patch | 45 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 61 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-02-06 12:50:54 UTC (rev 407559)
+++ PKGBUILD 2021-02-06 12:59:55 UTC (rev 407560)
@@ -9,7 +9,7 @@
pkgbase=python
pkgname=(python python-tests)
pkgver=3.9.1
-pkgrel=1
+pkgrel=2
_pybasever=${pkgver%.*}
pkgdesc="Next generation of the python high-level scripting language"
arch=('x86_64')
@@ -17,9 +17,13 @@
url="https://www.python.org/"
depends=('bzip2' 'expat' 'gdbm' 'libffi' 'libnsl' 'libxcrypt' 'openssl' 'zlib')
makedepends=('tk' 'sqlite' 'valgrind' 'bluez-libs' 'mpdecimal' 'llvm' 'gdb' 'xorg-server-xvfb' 'ttf-font')
-source=("https://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz"{,.asc})
+source=("https://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz"{,.asc}
+ mpdecimal-2.5.1.patch
+ bpo-42794.patch::https://github.com/python/cpython/commit/b20d5e5ce95248e0fa77c5d7bf8f6f5b1231fa53.patch)
sha512sums=('b90029d6825751685983e9dcf0e0ec9e46f18e6c7d37b0dd7a245a94316f8c0090308ad7c2b2b49ed2514b0b909177231dd5bcad03031bf4624e37136fcf8019'
- 'SKIP')
+ 'SKIP'
+ '58f683cbfdc6aa84c03d068c1bc2f1d8d2c17ba4f7b632c14ab1d529d8332e767354266c3815e239427497fff1a42ec2a37739ea312d24cb76a69dcf1c98c0ad'
+ '948f9c16e772a2f4c37f29e5b1d51da5fa10ae0f6701f2698f6e9dffe2f133431ec90f8e2223062a6691810e3b3a99449bf573e3f90e426b8a328a06f6094338')
validpgpkeys=('0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D' # Ned Deily (Python release signing key) <nad at python.org>
'E3FF2839C048B25C084DEBE9B26995E310250568') # Łukasz Langa (GPG langa.pl) <lukasz at langa.pl>
@@ -26,6 +30,12 @@
prepare() {
cd Python-${pkgver}
+ patch -p1 -i ../mpdecimal-2.5.1.patch
+ patch -p1 -i ../bpo-42794.patch
+
+ # https://bugs.python.org/issue41346
+ sed -i 's/-j0 //' Makefile.pre.in
+
# FS#23997
sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py
@@ -71,6 +81,8 @@
}
check() {
+ # test_tk and test_ttk_guionly: https://bugs.python.org/issue43139
+
cd Python-${pkgver}
# Obtain next free server number for xvfb-run; this even works in a chroot environment.
@@ -79,7 +91,7 @@
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
+ "${srcdir}/Python-${pkgver}/python" -m test.regrtest -v -uall -x test_tk -x test_ttk_guionly
}
package_python() {
Added: mpdecimal-2.5.1.patch
===================================================================
--- mpdecimal-2.5.1.patch (rev 0)
+++ mpdecimal-2.5.1.patch 2021-02-06 12:59:55 UTC (rev 407560)
@@ -0,0 +1,45 @@
+From dd436be488bdca2123d12d1e148d85cb6f98be5f Mon Sep 17 00:00:00 2001
+From: Stefan Krah <skrah at 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:
More information about the arch-commits
mailing list