I am trying to install a Python package that requires running gcc 4.2. My gcc is pointing correctly to gcc-4.2, i.e.
$ gcc -v
Using built-in specs.
Target:
This is most likely an issue with distutils, you shouldn't need to recompile python, or reinstall any packages.
Have you checked to see what version your CC environment variable is set to? It may very well still be set to 4.0. You can try:
export CC=gcc-4.2
python setup.py build
You could also take a look at:
/Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/config/Makefile
Which is where distutils gets its build settings from.