55 lines
1.5 KiB
Plaintext
55 lines
1.5 KiB
Plaintext
pkgname=python
|
|
pkgver=3.13.2
|
|
pkgdesc="The Python programming language"
|
|
license=('PSF-2.0')
|
|
homepage="https://www.python.org/"
|
|
sources=("Python-${pkgver}.tar.xz"
|
|
"${pkgname}-${pkgver}-docs-html.tar.bz2"
|
|
)
|
|
urls=("https://www.python.org/ftp/${pkgname}/${pkgver}/${sources[0]}"
|
|
"https://www.python.org/ftp/${pkgname}/doc/${pkgver}/${sources[1]}"
|
|
)
|
|
md5sums=("4c2d9202ab4db02c9d0999b14655dfe5"
|
|
"d6aede88f480a018d26b3206f21654ae"
|
|
)
|
|
|
|
src_prepare() {
|
|
tar -xf ${distdir}/${sources[0]} --strip-components=1
|
|
tar --no-same-owner -xf ${distdir}/${sources[1]}
|
|
}
|
|
|
|
src_build() {
|
|
# PGO should be done with -O3
|
|
CFLAGS="${CFLAGS/-O2/-O3}"
|
|
|
|
./configure --prefix=/usr \
|
|
--enable-shared \
|
|
--with-system-expat \
|
|
--without-ensurepip \
|
|
--enable-optimizations
|
|
make
|
|
}
|
|
|
|
src_check() {
|
|
LD_LIBRARY_PATH="${srcdir}":${LD_LIBRARY_PATH}\
|
|
make test TESTOPTS="--timeout 120"
|
|
}
|
|
|
|
src_install() {
|
|
# PGO should be done with -O3
|
|
CFLAGS="${CFLAGS/-O2/-O3} -ffat-lto-objects"
|
|
|
|
make DESTDIR="${pkgdir}" EXTRA_CFLAGS="$CFLAGS" install
|
|
|
|
ln -s python3 "${pkgdir}"/usr/bin/python
|
|
ln -s python3-config "${pkgdir}"/usr/bin/python-config
|
|
ln -s idle3 "${pkgdir}"/usr/bin/idle
|
|
ln -s pydoc3 "${pkgdir}"/usr/bin/pydoc
|
|
ln -s python${_pybasever}.1 "${pkgdir}"/usr/share/man/man1/python.1
|
|
|
|
# doc
|
|
install -v -dm755 "${pkgdir}/usr/share/doc/python-3.12.5/html"
|
|
cp -R --no-preserve=mode python-${pkgver}-docs-html/* \
|
|
"${pkgdir}/usr/share/doc/python-3.12.5/html"
|
|
}
|