Skip to content

Commit

Permalink
[py] add pypy
Browse files Browse the repository at this point in the history
  • Loading branch information
shish committed May 8, 2024
1 parent b5183ba commit 87b1420
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions py/build_pypy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -eu
cd $(dirname $0)

BUILDDIR=${BUILD_ROOT:-$(realpath $(dirname $0))/build}/$(basename $(pwd))-$(echo $(basename $0) | sed 's/build_*\(.*\).sh/\1/')-$(uname)-$(uname -m)-venv
if [ ! -d $BUILDDIR ] ; then
~/.pypy/bin/pypy3 -m venv $BUILDDIR
$BUILDDIR/bin/pip install pysdl2 pysdl2-dll
fi
source $BUILDDIR/bin/activate

cat >rosettaboy-pypy <<EOD
#!/usr/bin/env bash
set -eu
source $BUILDDIR/bin/activate
exec python3 -c "from src.main import main ; import sys ; sys.exit(main(sys.argv))" \$*
EOD
chmod +x rosettaboy-pypy

0 comments on commit 87b1420

Please sign in to comment.