summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfokx2023-05-04 08:47:31 +0800
committerfokx2023-05-04 08:47:31 +0800
commitea4debf8acb589c8ffbc902e6d1a581bd24c4945 (patch)
tree80d448833a82b194095ba9bd3b1b83134027b75f
parentf5d0e3022eac18e77e3906296c078908a0d8e73d (diff)
downloadaur-ea4debf8acb589c8ffbc902e6d1a581bd24c4945.tar.gz
init
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD83
2 files changed, 69 insertions, 37 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0e4c0d16f221..9f5ceb0efbde 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,18 @@
pkgbase = python310
- pkgdesc = Major release 3.10 of the Python high-level programming language
- pkgver = 3.10.3
- pkgrel = 2
+ pkgdesc = Next generation of the python high-level scripting language, version 3.10
+ pkgver = 3.10.11
+ pkgrel = 1
url = https://www.python.org/
- arch = i686
arch = x86_64
license = custom
+ makedepends = tk
+ makedepends = sqlite
makedepends = bluez-libs
makedepends = mpdecimal
+ makedepends = llvm
makedepends = gdb
+ makedepends = xorg-server-xvfb
+ makedepends = ttf-font
depends = bzip2
depends = expat
depends = gdbm
@@ -17,14 +21,19 @@ pkgbase = python310
depends = libxcrypt
depends = openssl
depends = zlib
+ optdepends = python-setuptools
+ optdepends = python-pip
optdepends = sqlite
optdepends = mpdecimal: for decimal
optdepends = xz: for lzma
optdepends = tk: for tkinter
- provides = python=3.10.3
- source = https://www.python.org/ftp/python/3.10.3/Python-3.10.3.tar.xz
+ provides = python=3.10.11
+ source = https://www.python.org/ftp/python/3.10.11/Python-3.10.11.tar.xz
+ source = https://www.python.org/ftp/python/3.10.11/Python-3.10.11.tar.xz.asc
validpgpkeys = 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
validpgpkeys = E3FF2839C048B25C084DEBE9B26995E310250568
- sha256sums = 596c72de998dc39205bc4f70ef0dbf7edec740a306d09b49a9bd0a77806730dc
+ validpgpkeys = A035C8C19219BA821ECEA86B64E628F8D684696D
+ sha512sums = fa113b4b635d271a1412999587ec64654d337db263851a6a9d88b3cab4ed66dba76fe03e65c4d341f0a83fd8182d35e245bfd9827465d7aebcb4deb71af4d047
+ sha512sums = SKIP
pkgname = python310
diff --git a/PKGBUILD b/PKGBUILD
index 060d51bfd09a..d7bdfa3dbc48 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,47 +1,61 @@
-# Maintainer: Tobias Kunze <r@rixx.de>
-# Maintained at https://github.com/rixx/pkgbuilds, feel free to submit patches
+# Maintainer: soh @ AUR
+# Contributor: Angel Velasquez <angvp@archlinux.org>
+# Contributor: Felix Yan <felixonmars@archlinux.org>
+# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: Jason Chu <jason@archlinux.org>
+
+shopt -s extglob
pkgname=python310
-pkgver=3.10.3
-pkgrel=2
-_pybasever=3.10
+pkgver=3.10.11
+pkgrel=1
_pymajver=3
-pkgdesc="Major release 3.10 of the Python high-level programming language"
-arch=('i686' 'x86_64')
+_pybasever=${pkgver%.*}
+pkgdesc="Next generation of the python high-level scripting language, version 3.10"
+arch=('x86_64')
license=('custom')
url="https://www.python.org/"
depends=('bzip2' 'expat' 'gdbm' 'libffi' 'libnsl' 'libxcrypt' 'openssl' 'zlib')
-makedepends=('bluez-libs' 'mpdecimal' 'gdb')
-optdepends=('sqlite' 'mpdecimal: for decimal' 'xz: for lzma' 'tk: for tkinter')
-source=(https://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.xz)
-sha256sums=('596c72de998dc39205bc4f70ef0dbf7edec740a306d09b49a9bd0a77806730dc')
-validpgpkeys=(
- '0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D' # Ned Deily (Python release signing key) <nad@python.org>
- 'E3FF2839C048B25C084DEBE9B26995E310250568' # Łukasz Langa (GPG langa.pl) <lukasz@langa.pl>
-)
+makedepends=('tk' 'sqlite' 'bluez-libs' 'mpdecimal' 'llvm' 'gdb' 'xorg-server-xvfb' 'ttf-font')
+optdepends=('python-setuptools'
+ 'python-pip'
+ 'sqlite'
+ 'mpdecimal: for decimal'
+ 'xz: for lzma'
+ 'tk: for tkinter')
+source=("https://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz"{,.asc})
+sha512sums=('fa113b4b635d271a1412999587ec64654d337db263851a6a9d88b3cab4ed66dba76fe03e65c4d341f0a83fd8182d35e245bfd9827465d7aebcb4deb71af4d047'
+ 'SKIP')
+validpgpkeys=('0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D' # Ned Deily (Python release signing key) <nad@python.org>
+ 'E3FF2839C048B25C084DEBE9B26995E310250568' # Łukasz Langa (GPG langa.pl) <lukasz@langa.pl>
+ 'A035C8C19219BA821ECEA86B64E628F8D684696D') # Pablo Galindo Salgado <pablogsal@gmail.com>
provides=("python=$pkgver")
prepare() {
- cd "${srcdir}/Python-${pkgver}"
+ cd Python-${pkgver}
# FS#23997
sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py
- # Ensure that we are using the system copy of various libraries (expat, zlib and libffi),
+ # Ensure that we are using the system copy of various libraries (expat, libffi, and libmpdec),
# rather than copies shipped in the tarball
- rm -rf Modules/expat
- rm -rf Modules/zlib
- rm -rf Modules/_ctypes/{darwin,libffi}*
- rm -rf Modules/_decimal/libmpdec
+ rm -r Modules/expat
+ rm -r Modules/_ctypes/{darwin,libffi}*
+ rm -r Modules/_decimal/libmpdec
}
build() {
- cd "${srcdir}/Python-${pkgver}"
+ cd Python-${pkgver}
+
+ # PGO should be done with -O3
+ CFLAGS="${CFLAGS/-O2/-O3} -ffat-lto-objects"
- CFLAGS="${CFLAGS} -fno-semantic-interposition"
+ # Disable bundled pip & setuptools
./configure --prefix=/usr \
--enable-shared \
--with-computed-gotos \
+ --enable-optimizations \
--with-lto \
--enable-ipv6 \
--with-system-expat \
@@ -52,13 +66,24 @@ build() {
--without-ensurepip \
--with-tzpath=/usr/share/zoneinfo
- make EXTRA_CFLAGS="$CFLAGS"
+ # Obtain next free server number for xvfb-run; this even works in a chroot environment.
+ export servernum=99
+ while ! xvfb-run -a -n "$servernum" /bin/true 2>/dev/null; do servernum=$((servernum+1)); done
+
+ LC_CTYPE=en_US.UTF-8 xvfb-run -s "-screen 0 1920x1080x16 -ac +extension GLX" -a -n "$servernum" make EXTRA_CFLAGS="$CFLAGS"
}
+
package() {
- cd "${srcdir}/Python-${pkgver}"
- # altinstall: /usr/bin/pythonX.Y but not /usr/bin/python or /usr/bin/pythonX
- make DESTDIR="${pkgdir}" altinstall maninstall
+ cd Python-${pkgver}
+
+ # Hack to avoid building again
+ sed -i 's/^all:.*$/all: build_all/' Makefile
+
+ # PGO should be done with -O3
+ CFLAGS="${CFLAGS/-O2/-O3}"
+
+ make DESTDIR="${pkgdir}" EXTRA_CFLAGS="$CFLAGS" 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}
@@ -67,10 +92,8 @@ package() {
rm -f "${pkgdir}/usr/lib/libpython${_pymajver}.so"
rm -f "${pkgdir}/usr/share/man/man1/python${_pymajver}.1"
- # Clean-up reference to build directory
- sed -i "s|$srcdir/Python-${pkgver}:||" "$pkgdir/usr/lib/python${_pybasever}/config-${_pybasever}-${CARCH}-linux-gnu/Makefile"
- # Add useful scripts FS#46146
+ # some useful "stuff" FS#46146
install -dm755 "${pkgdir}"/usr/lib/python${_pybasever}/Tools/{i18n,scripts}
install -m755 Tools/i18n/{msgfmt,pygettext}.py "${pkgdir}"/usr/lib/python${_pybasever}/Tools/i18n/
install -m755 Tools/scripts/{README,*py} "${pkgdir}"/usr/lib/python${_pybasever}/Tools/scripts/