astropy/astropy — pull request #314 by astrofrog (2012-07-10 12:27:42+00:00)
Title: Raise an explicit error if compiler is set to a version that will fail if CC environment variable is set.

Some people have the CC variable set unknowingly, and it can in some cases point to the faulty apple ``llvm-gcc-4.2``. This PR implements a fix, by checking the compiler specified by the CC environment variable and giving an error if it is a faulty one. I decided to:

* print an error message and call ``sys.exit`` manually, as the traceback is not useful and confusing for most users.

* *not* automatically switch to clang (or other) as if the user does:

CC=whatever python setup.py build

they will not understand if the compiler magically changes to something else.

@mdboom - any thoughts since you implemented the original version of this?