matplotlib/matplotlib — pull request #1613 by mdehoon (2012-12-20 05:08:19+00:00)
Title: Using a stricter check to see if Python was installed as a framework.

Using a stricter check to see if Python was installed as a framework. Also, because of the recurring problems with non-framework Pythons, importing the Mac OS X backend will now fail (instead of just issuing a warning) if Python is not installed as a framework. This patch uses the WITH_NEXT_FRAMEWORK macro in pyconfig.h to determine if Python is installed as a framework. This is safer than the previous approach using CGMainDisplayID().

This is a bug fix for issue 665 (https://github.com/matplotlib/matplotlib/issues/665).