[Pythonmac-SIG] Re: The PantherPythonFix installer and C++
extensions
Bob Ippolito
bob at redivi.com
Thu Dec 30 00:55:37 CET 2004
On Dec 29, 2004, at 6:25 PM, Jack Jansen wrote:
>
> On 29-dec-04, at 11:40, Bob Ippolito wrote:
> [Bob notes that my PantherPythonFix installer will break C++
> compilation because distutils simply replaces the first component of
> LDSHARED with "c++"]
>>> Any suggestions as to what to do to get c++ compilation fixed?
>>
>> I can think of two ways:
>>
>> 1. Patch distutils to actually do
>> os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' because
>> CCompiler.spawn doesn't take an environment dict.
>> 2. Patch distutils to skip over environment variables (basically
>> change that "0" into something smarter). This is probably less
>> desirable because who knows where this happens, and who knows what
>> third party compiler subclasses used this original stupid code as a
>> template.
>
> Both of these mean that "the simple installer that just puts a new
> Makefile into lib/python2.3/config" has just gone out the window:-(
Yeah.. I'd rather have broken C++ support than broken linker support
though.. so this patch is better than no patch.
> I think I have a better alternative to both of these suggestions
> (basically what I just checked in for 2.5a0: allow the Makefile to
> force a setting for MACOSX_DEPLOYMENT_TARGET, unless it was set
> already), but that still leaves the problem that there's more files to
> patch.
>
> We could of course replace sysconfig.py and sysconfig.pyc in place,
> but I don't feel happy about that. (So: please argue that it isn't a
> problem).
I'm +1 for replacing sysconfig.py. It's known to be exactly the one
included with 2.3.0. The user gets what they deserve if they made
their own changes to sysconfig.py here.
> Or we could install a newer, patched distutils into
> /Library/Python/2.3. But that has the problem that it'll obliterate
> any other newer distutils the end user may have installed. Also not a
> good idea.
-1.. you would also need to use a weird .pth hack to make sure it gets
into sys.path before stdlib..
-bob
More information about the Pythonmac-SIG
mailing list