pkgname=python3 pkgver=3.11.10 pkgrel=1 _pybasever=3.11 pkgdesc="Next generation of the python high-level scripting language" arch=('x86_64') license=('custom') url="https://www.python.org" depends=('expat' 'bzip2' 'gdbm' 'openssl' 'libffi' 'zlib' 'libxcrypt') makedepends=('sqlite' 'valgrind' 'bluez' 'llvm' 'xorg-server') options=('!makeflags') source=("https://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.xz") md5sums=('af59e243df4c7019f941ae51891c10bc') build() { cd Python-${pkgver} sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py # Use the system copy rm -r Modules/expat rm -r Modules/_ctypes/{darwin,libffi}* ./configure --prefix=/usr \ --enable-shared \ --with-computed-gotos \ --enable-optimizations \ --enable-ipv6 \ --with-valgrind \ --with-system-expat \ --with-dbmliborder=gdbm:ndbm \ --with-system-ffi \ --without-ensurepip make } check() { cd Python-${pkgver} # 1 fail tests: test_sqlite3, 446 tests ok LD_LIBRARY_PATH=${srcdir}/Python-${pkgver}:${LD_LIBRARY_PATH} \ ${srcdir}/Python-${pkgver}/python -m test.regrtest -x test_posixpath test_logging test_site test_urllib2_localnet test_pyexpat } package() { cd Python-${pkgver} make DESTDIR=${pkgdir} install maninstall # python3 is default python binary ln -sf python${_pybasever} ${pkgdir}/usr/bin/python install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE }