Building a Zero MQ application on OS X

I’ve been trying to build a self-contained app bundle that uses Zero MQ on OS X. After spending a day with py2app on OS X, these are the steps I had to take.

  1. Install homebrew. http://mxcl.github.com/homebrew/
  2. Then install the latest version of Python via home brew. This is necessary as py2app doesn’t makes a partially redistributable apps if you’re using the system python.
  3. Install Zero MQ via home brew.
  4. Install pyzmq and py2app, using the easy_install that’s installed via home brew. This is normally located in /usr/local/share/python.

To generate an app bundle, ensure you add the flags –package zmq or else the resulting app bundle will not run. I’m told this is because py2app may occasionally require a helping hand with resolving dependencies.