[Numpy-discussion] numscons/numpy.distutils bug related to MACOSX_DEPLOYMENT_TARGET

Brian Granger ellisonbg.net@gmail....
Tue Feb 3 18:20:54 CST 2009


Robert,

Thanks.

Yes, I just saw that this will work.  When I fixed this in Cython a
while back this workaround wouldn't work.  Would you still consider
this a bug?  The logic to fix it is fairly simply.

Brian

On Tue, Feb 3, 2009 at 4:17 PM, Robert Kern <robert.kern@gmail.com> wrote:
> On Tue, Feb 3, 2009 at 18:12, Brian Granger <ellisonbg.net@gmail.com> wrote:
>> I am trying to use numscons to build a project and have run into a
>> show stopper.  I am using:
>>
>> OS X 10.5
>> The builtin Python 2.5.2
>>
>> Here is what I see upon running python setup.py scons:
>>
>> scons: Reading SConscript files ...
>> DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3"
>> but "10.5" during configure:
>>  File "/Users/bgranger/Library/Python/2.5/src/numscons/tests/examples/checkers/SConstruct",
>> line 2:
>>    GetInitEnvironment(ARGUMENTS).DistutilsSConscript('SConscript')
>>  File "/Users/bgranger/Library/Python/2.5/site-packages/numscons-0.9.4-py2.5.egg/numscons/core/numpyenv.py",
>> line 108:
>> [this goes on for a while]
>>
>> This bug is one that I am familiar with.  Here is a sketch:
>>
>> * numpy.distutils sets MACOSX_DEPLOYMENT_TARGET=10.3 if
>> MACOSX_DEPLOYMENT_TARGET is not set in the environment.
>>
>> * But, the built-in Python on OS X 10.5 has
>> MACOSX_DEPLOYMENT_TARGET=10.5.  When Python is built, it saves this
>> info in a file.
>>
>> * When called distutils checks to make sure that the current value of
>> MACOSX_DEPLOYMENT_TARGET matches the one that was used to build
>> Python.
>>
>> Hence the mismatch.  I am pretty sure that the offending code is in:
>>
>> numpy.distutils.fcompiler.gnu.get_flags_linker_so
>>
>> I think I know how to fix this and will get started on it, but I
>> wanted to see if anyone else had any experience with this or knew
>> another way around this.
>
> Well, the workaround is to set MACOSX_DEPLOYMENT_TARGET=10.5 in your
> environment.
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
>  -- Umberto Eco
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>


More information about the Numpy-discussion mailing list