I'm a long time user of macports, but recently I have decided to check out homebrew for a number of reasons. Currently there is no standard way to install pymol with this technique, but I thought it should be possible. I set out to install pymol from source without the MacPorts libraries that had helped me before.

I had significant trouble installing the current stable tarball. After serious alterations to the setup script and some header files, I finally got it to compile the cmd library, but any time I tried to load it with python I had an error saying that it could not find the symbol `_glutswapbuffers`. 

Clearly some of this was a known issue because many of these changes were addressed in the most recent trunk/head of the svn repository. I had to make a few minor changes to make sure that it supports non-MacPorts installations (https://gist.github.com/4267806), but it was rather trivial. With this, I could install given I had Xquartz installed and a few other dependencies. I created a homebrew repo that takes advantage of this change here:


Using the above, you can successfully install pymol using homebrew. The only problem ... the toolbar fails to function. It does not throw any errors if you have Pmw installed, but the toolbar widget never shows itself. I have dome some other testing (https://gist.github.com/4269280) to see if I can get the toolbar to show up, but no luck. 

Does anyone have any hints as to where to look to get passed this part. Also, if you have any ideas on fixing the `glutswapbuffers` error on the "stable" branch, I'd love to hear it. Anyway, I hope this helps any users of homebrew out there.

Derek Thomas