(You need XCode Command Line tools if you haven't got it already.)
-
Download
pypy
2.0 beta 1 from http://pypy.org/download.html. -
Symlink
pypy
to/usr/local/bin
or someplace that your$PATH
points to. -
Install
pip
by following http://doc.pypy.org/en/latest/getting-started.html#installing-pypy.You may want to symlink this pip at /usr/local/bin/pypy-pip or something.
-
pypy-pip install cffi
. -
Checkout pysdl-cffi.
hg clone https://bitbucket.org/duangle/pysdl-cffi
. -
Download SDL-2.0 source and build it:
hg clone http://hg.libsdl.org/SDL
(You can also use the 2.0 snapshot.)cd SDL
mkdir build
../configure
make -j8
make install
(You might need sudo depending on permission at/usr/local
.) -
Symlink
libSDL22.dylib
intopysdl-cffi/sdl/
. It's probably at/usr/local/lib
. -
Go back to
pysdl-cffi
, and runpypy setup.py install
. -
Test your installation. Comment out line 7 of
pysdl-cffi/testing/test_window.py
, because that just calls for a infinite import loop. Then intesting
runpypy test_clipboard.py
andpypy test_window.py
.As far as I can tell, the first one adds "Hey everyone!" to your clipboard, while the second one draws random points in a white canvas for 5 seconds.
I'm probably missing something here. Feel free to fork this gist.