[mod_python] PIL not working in mod_python on macosx 10.5

Arnaud Delobelle delobelle at blueyonder.co.uk
Wed Nov 7 15:45:23 EST 2007


On 7 Nov 2007, at 20:06, Arnaud Delobelle wrote:
> OK I've done this and it works now.  There aren't any makefiles in  
> PIL, it's all done through a setup.py script.  If anyone is  
> insterested, I used the following awful hack: after the lines
>
> from distutils import sysconfig
> from distutils.core import Extension, setup
> from distutils.command.build_ext import build_ext
>
> add the following lines
>
> OrigExtension = Extension
> def Extension(*args, **kwargs):
>    extra_args = ['-arch', 'ppc', '-arch', 'ppc64', '-arch', 'i386',  
> '-arch', 'x86_64']
>    kwargs['extra_compile_args'] = extra_args +  
> kwargs.get('extra_args', [])
This should obviously read:
       kwargs['extra_compile_args'] = extra_args +  
kwargs.get('extra_compile_args', [])

>
>    kwargs['extra_link_args'] = extra_args +  
> kwargs.get('extra_link_args', [])
>    return OrigExtension(*args, **kwargs)
>

-- 
Arnaud




More information about the Mod_python mailing list