Issue 1095822: Apple-installed Python fails to build extensions (original) (raw)

Apple-installed Python 2.3 (on Mac OS X 10.3) can no longer build extension modules after a newer framework build has been installed.

This happens because it will build extensions with "-framework Python", which will actually link against the newer framework (be it 2.3.X or 2.4 or later) that is in /Library in stead of against it's own framework in /System/Library.

After over a year of debating multiple solutions the Pythonmac-SIG consensus is that linking extensions with "-undefined dynamic_lookup" in stead of against the framework is the best solution.

All of 2.5a0, 2.4.1 and 2.3.5 will detect the fact that they are being run on a machine that has an Apple-installed python that needs to be patched, and apply that patch. A standalone patch installer will also be made available.

In addition, 2.5a0, 2.4.1 and 2.3.5 themselves will also use the -undefined dynamic_lookup method of linking when running on 10.3 or later (unless the user has specifically set MACOSX_DEPLOYMENT_TARGET to 10.2 or earlier).

Logged In: YES user_id=45365

All three of 2.3.X, 2.4.X and 2.5a0 now link extensions in a way that makes them either portable between Pythons (10.3 or later) or at least work in the face of other installed Pythons (10.2 or earlier).

In addition, doing a frameworkinstall of either 2.3.X, 2.4.X or 2.5a0 will test whether an unpatched Apple-installed Python sits on the machine, and if there is it will warn the user to apply a patch.