mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-06 04:46:42 +02:00
main/python3: compile .pyc for system site dir packages
ref https://gitlab.alpinelinux.org/alpine/aports/-/issues/11906 ref https://gitlab.alpinelinux.org/alpine/abuild/-/merge_requests/194
This commit is contained in:
parent
3c1ba0b527
commit
4c5d28cdfe
@ -4,17 +4,19 @@ pkgname=python3
|
||||
# the python3-tkinter's pkgver needs to be synchronized with this.
|
||||
pkgver=3.11.3
|
||||
_basever="${pkgver%.*}"
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="A high-level scripting language"
|
||||
url="https://www.python.org/"
|
||||
arch="all"
|
||||
license="PSF-2.0"
|
||||
triggers="$pkgname-pycompile.trigger=/usr/lib/python$_basever"
|
||||
subpackages="
|
||||
$pkgname-dbg
|
||||
$pkgname-dev
|
||||
$pkgname-doc
|
||||
$pkgname-tests::noarch
|
||||
$pkgname-gdbm
|
||||
$pkgname-pycompile
|
||||
"
|
||||
makedepends="
|
||||
!gettext-dev
|
||||
@ -211,6 +213,15 @@ gdbm() {
|
||||
amove usr/lib/python3*/lib-dynload/_gdbm.cpython*
|
||||
}
|
||||
|
||||
pycompile() {
|
||||
pkgdesc="automatically compile python3 package pycache"
|
||||
install_if="$pkgname=$pkgver-r$pkgrel"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib/python3
|
||||
# be nonempty so trigger is written ??
|
||||
touch "$subpkgdir"/usr/lib/python3/__pycachetrigger__
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
a3bba4b69322a47bfeefe42ba0fd7331b5b67fd2ab41441e2219d16ef8c6f307f1a48977afd073c18cfd24ec6cb1bfe0c4bb4b273031eb524dc7e9fb5fbcc3b6 Python-3.11.3.tar.xz
|
||||
fe123dd871f7a3fa868c499a957b94f1d815a1e1de964aaff1116c579defd4d9d1e9b7eb418cf114b169b97426ed603bf4b1e61b45ec483df06abe988c6a30ee fix-xattrs-glibc.patch
|
||||
|
||||
4
main/python3/python3-pycompile.trigger
Normal file
4
main/python3/python3-pycompile.trigger
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
# just two jobs to be a bit faster but not overuse resources
|
||||
python3 -m compileall -j2 -q "$@"
|
||||
Loading…
x
Reference in New Issue
Block a user