(You need XCode Command Line tools if you haven't got it already.)
-
Download
pypy2.0 beta 1 from http://pypy.org/download.html. -
Symlink
pypyto/usr/local/binor someplace that your$PATHpoints to. -
Install
pipby 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 SDLmkdir build../configuremake -j8make install(You might need sudo depending on permission at/usr/local.) -
Symlink
libSDL22.dylibintopysdl-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 intestingrunpypy test_clipboard.pyandpypy 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.