Ad

Compiler Options Wrong With Python Setup.py

- 1 answer

I'm trying to install matplotlib on my mac setup. I find that setup.py has inaccurate flags, in particular the isysroot points to an earlier SDK.

Where does setup.py get its info and how can i fix it?

I'm on MacOS 10.5.8, XCode 3.1.2 and Python 2.6 (default config was 2.5)

Ad

Answer

I'm guessing you've installed 2.6 on 10.5 using the python.org OS X installer. In that case, the flags are accurate and you should not try to change them. The python.org installers are built using the so-called 10.4u SDK and with a deployment target of 10.3, allowing one installer image to work on Mac OS X systems from 10.3.9 up through 10.6 (and possibly beyond). The most recent releases of Python 2.6 have been fixed to ensure that extension module building on OS X forces the C compiler options to match those of the underlying Python so you'll need to make sure you install the 10.4u SDK (or whatever) if necessary from the Xcode package (on the OS X release CD/DVD or downloaded from the Apple Developer Connection website). It will also make sure you are using gcc-4.0, which is also the default on 10.5.

Ad
source: stackoverflow.com
Ad