/
PKGBUILD
54 lines (44 loc) · 1.43 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
pkgname=python3
pkgver=3.11.9
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=('22ea467e7d915477152e99d5da856ddc')
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
}