python-imaging/Pillow — pull request #442 by ohanar (2013-12-11 09:33:33+00:00)
Title: Include and library path fixes

Right now Pillow will pick up a Python install from `/usr/local`, `/sw`, etc and try to use their headers/link to them over the Python interpreter that is running `setup.py` (this obviously will create a broken install, in a best case scenario). This is easily resolved by correctly prioritizing the include and library paths. In particular, the ordering should be

1. user specified paths
1. prefix path
1. platform paths
1. standard paths