Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.92 KB | None | 0 0
  1. # translation and packaging steps are py3 incompatible,
  2. # upstream recommends pypy2 for 4x speed and 75% RAM usage
  3. [ -e /usr/bin/pypy2 ] &&
  4.     _translator=pypy2 ||
  5.     _translator=python2
  6.  
  7. # translate to C files; write to $srcdir/usession-$pkgname-0
  8. PYPY_USESSION_DIR=$srcdir \
  9. PYPY_USESSION_BASENAME=$pkgname \
  10. $_translator ../../rpython/bin/rpython \
  11.     --shared \
  12.     --batch \
  13.     --make-jobs=1 \
  14.     --source \
  15.     -Ojit \
  16.     targetpypystandalone
  17.  
  18. # '--source' removes the gcc stage (letting the translator exit
  19. # and thus freeing up ~6GB of RAM) leaving the following steps:
  20. _cdir=$srcdir/usession-$pkgname-0/testing_1
  21. make -sj$JOBS -C $_cdir
  22. mv $_cdir/pypy*-c $_cdir/libpypy*-c.so .
  23. ./pypy*-c ../tool/build_cffi_imports.py
  24.  
  25. # use upstream's release script to build *.pyc
  26. cd "$builddir/pypy/tool/release"
  27. python2 package.py \
  28.     --archive-name $pkgname-$pkgver-alpine-$CARCH \
  29.     --builddir "$_reldir" \
  30.     --rename_pypy_c $pkgname
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement