Add some changes from official Python

This commit is contained in:
Tobias Kunze 2021-10-05 11:42:17 +02:00
parent e85c7ea497
commit b5d74ba27c

View File

@ -10,9 +10,9 @@ pkgdesc="Major release 3.9 of the Python high-level programming language"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
license=('custom') license=('custom')
url="https://www.python.org/" url="https://www.python.org/"
depends=('expat' 'bzip2' 'gdbm' 'openssl' 'libffi' 'zlib') depends=('bzip2' 'expat' 'gdbm' 'libffi' 'libnsl' 'libxcrypt' 'openssl' 'zlib')
makedepends=('tk' 'sqlite' 'bluez-libs' 'mpdecimal') makedepends=('bluez-libs' 'mpdecimal' 'gdb')
optdepends=('tk: for tkinter' 'sqlite') optdepends=('sqlite' 'mpdecimal: for decimal' 'xz: for lzma' 'tk: for tkinter')
source=( source=(
https://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.xz https://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.xz
mpdecimal-2.5.1.patch mpdecimal-2.5.1.patch
@ -21,6 +21,10 @@ sha256sums=(
'397920af33efc5b97f2e0b57e91923512ef89fc5b3c1d21dbfc8c4828ce0108a' '397920af33efc5b97f2e0b57e91923512ef89fc5b3c1d21dbfc8c4828ce0108a'
'8eb389be1babe03a0231001dc16dd2d69a3ea0fbf6b8c976a580787e7ff1594c' '8eb389be1babe03a0231001dc16dd2d69a3ea0fbf6b8c976a580787e7ff1594c'
) )
validpgpkeys=(
'0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D' # Ned Deily (Python release signing key) <nad@python.org>
'E3FF2839C048B25C084DEBE9B26995E310250568' # Łukasz Langa (GPG langa.pl) <lukasz@langa.pl>
)
provides=('python') provides=('python')
prepare() { prepare() {
@ -41,19 +45,22 @@ prepare() {
build() { build() {
cd "${srcdir}/Python-${pkgver}" cd "${srcdir}/Python-${pkgver}"
CFLAGS="${CFLAGS} -fno-semantic-interposition"
CFLAGS=-DOPENSSL_NO_SSL2 ./configure --prefix=/usr \ ./configure --prefix=/usr \
--enable-shared \ --enable-shared \
--with-threads \
--with-computed-gotos \ --with-computed-gotos \
--with-lto \
--enable-ipv6 \ --enable-ipv6 \
--with-system-expat \ --with-system-expat \
--with-dbmliborder=gdbm:ndbm \ --with-dbmliborder=gdbm:ndbm \
--with-system-ffi \
--with-system-libmpdec \ --with-system-libmpdec \
--enable-loadable-sqlite-extensions \ --enable-loadable-sqlite-extensions \
--without-ensurepip --without-ensurepip \
--with-tzpath=/usr/share/zoneinfo
make make EXTRA_CFLAGS="$CFLAGS"
} }
package() { package() {
@ -61,6 +68,9 @@ package() {
# altinstall: /usr/bin/pythonX.Y but not /usr/bin/python or /usr/bin/pythonX # altinstall: /usr/bin/pythonX.Y but not /usr/bin/python or /usr/bin/pythonX
make DESTDIR="${pkgdir}" altinstall maninstall make DESTDIR="${pkgdir}" altinstall maninstall
# Split tests
rm -r "$pkgdir"/usr/lib/python*/{test,ctypes/test,distutils/tests,idlelib/idle_test,lib2to3/tests,sqlite3/test,tkinter/test,unittest/test}
# Avoid conflicts with the main 'python' package. # Avoid conflicts with the main 'python' package.
rm -f "${pkgdir}/usr/lib/libpython${_pymajver}.so" rm -f "${pkgdir}/usr/lib/libpython${_pymajver}.so"
rm -f "${pkgdir}/usr/share/man/man1/python${_pymajver}.1" rm -f "${pkgdir}/usr/share/man/man1/python${_pymajver}.1"