Skip to content

Instantly share code, notes, and snippets.

@Spaxe
Last active December 14, 2015 05:48
Show Gist options
  • Save Spaxe/5037598 to your computer and use it in GitHub Desktop.
Save Spaxe/5037598 to your computer and use it in GitHub Desktop.
Setup steps for @0x17 on Mac OS X 10.8

(You need XCode Command Line tools if you haven't got it already.)

  1. Download pypy 2.0 beta 1 from http://pypy.org/download.html.

  2. Symlink pypy to /usr/local/bin or someplace that your $PATH points to.

  3. 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.

  4. pypy-pip install cffi.

  5. Checkout pysdl-cffi. hg clone https://bitbucket.org/duangle/pysdl-cffi.

  6. 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.)

  7. Symlink libSDL22.dylib into pysdl-cffi/sdl/. It's probably at /usr/local/lib.

  8. Go back to pysdl-cffi, and run pypy setup.py install.

  9. Test your installation. Comment out line 7 of pysdl-cffi/testing/test_window.py, because that just calls for a infinite import loop. Then in testing run pypy test_clipboard.py and pypy 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment