Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # translation and packaging steps are py3 incompatible,
- # upstream recommends pypy2 for 4x speed and 75% RAM usage
- [ -e /usr/bin/pypy2 ] &&
- _translator=pypy2 ||
- _translator=python2
- # translate to C files; write to $srcdir/usession-$pkgname-0
- PYPY_USESSION_DIR=$srcdir \
- PYPY_USESSION_BASENAME=$pkgname \
- $_translator ../../rpython/bin/rpython \
- --shared \
- --batch \
- --make-jobs=1 \
- --source \
- -Ojit \
- targetpypystandalone
- # '--source' removes the gcc stage (letting the translator exit
- # and thus freeing up ~6GB of RAM) leaving the following steps:
- _cdir=$srcdir/usession-$pkgname-0/testing_1
- make -sj$JOBS -C $_cdir
- mv $_cdir/pypy*-c $_cdir/libpypy*-c.so .
- ./pypy*-c ../tool/build_cffi_imports.py
- # use upstream's release script to build *.pyc
- cd "$builddir/pypy/tool/release"
- python2 package.py \
- --archive-name $pkgname-$pkgver-alpine-$CARCH \
- --builddir "$_reldir" \
- --rename_pypy_c $pkgname
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement