blob: b4c8c4aa597e9aa0e837813b5fa937e66e937df9 (
plain)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# Maintainer: Thomas Liske <thomas@fiasko-nw.net>
pkgname=pypy3
pkgver=7.3.9
_pkgver=${pkgver/_/}
pkgrel=1
pkgdesc="Fast, compliant alternative implementation of Python 3.8"
url="https://www.pypy.org/"
arch="x86 x86_64 aarch64 s390x"
license="MIT"
makedepends="
bzip2-dev
expat-dev
gdbm-dev
libffi-dev
linux-headers
ncurses-dev
openssl-dev>3
pypy
readline-dev
rsync
sqlite-dev
tk-dev
util-linux-misc
xz-dev
zlib-dev
"
[ "$CARCH" = "x86" ] && options="textrels" # on x86 has textrels
source="https://downloads.python.org/pypy/pypy3.8-v$_pkgver-src.tar.bz2
0001-time.patch
0002-extern-stdio.patch
"
builddir="$srcdir/pypy3.8-v$_pkgver-src"
options="$options !check" # todo
build() {
cd pypy/goal
# translate with JIT
[[ "$JOBS" -gt 16 ]] && JOBS=16
pypy ../../rpython/bin/rpython --opt=jit --shared --make-jobs=${JOBS:-2} targetpypystandalone
# compile binary modules
PYTHONPATH=../.. ./pypy3-c ../../lib_pypy/pypy_tools/build_cffi_imports.py
}
check() {
cd pypy/goal
./pypy3-c -u ../test_all.py \
../module/pypyjit/test_pypy_c
}
package() {
install -Dm755 pypy/goal/pypy3-c "$pkgdir"/usr/lib/pypy/bin/pypy3-c
install -Dm755 pypy/goal/libpypy3-c.so "$pkgdir"/usr/lib/pypy/bin/libpypy3-c.so
rsync -r --exclude='__pycache__' --exclude='*.c' --exclude '*.o' lib_pypy/ "$pkgdir"/usr/lib/pypy/lib_pypy/
rsync -r --exclude='__pycache__' --exclude='test' --exclude='tests' lib-python/ "$pkgdir"/usr/lib/pypy/lib-python/
rsync -r --include='*.h' -f 'hide,! */' include/ "$pkgdir"/usr/lib/pypy/include/
# Install symlinks
mkdir -p "$pkgdir"/usr/bin "$pkgdir"/usr/lib
ln -s ../lib/pypy/bin/pypy3-c "$pkgdir"/usr/bin/pypy3
ln -s pypy/bin/libpypy3-c.so "$pkgdir"/usr/lib/libpypy3-c.so
}
sha512sums="
2d1f1c0eda08344332fb983a1cd4e76391eb95197519d151d28ff7e6d3a337bc584908eed523a2f26aee0f62e61650353fada1a0d96d57dd197b2f349e033609 pypy3.8-v7.3.9-src.tar.bz2
42abc8c67c249ff012010aec568579cd738ed2d74ffdf93755c9427117e85cd859390266c7431fcb4d2fcfd82b61d5ba0c58bd0ceda44e5d12bf22df5935bb24 0001-time.patch
b648204914072e74367b94065d65b423324bcbabc0e2199ad195ab9822ccc6c51ec552c8c17ed22c26caf73b04d16d6f4c3e14a8d1af0e378d76d6c3b587b784 0002-extern-stdio.patch
"
|