[Pythonmac-SIG] Leopard easy_install chokes on appscript egg

has hengist.podd at virgin.net
Thu Jan 3 22:06:44 CET 2008


On 31 Dec 2007, at 14:09, Ronald Oussoren wrote:

[cc.d to Bob for his info]

>>> That's a buglet in Python, fixed in what will be 2.5.2. Apple's  
>>> python doesn't do universal binaries and setuptools doesn't know  
>>> that an 'fat' egg will do on a 'ppc' or 'i386' platform.

After further poking, it does appear as if 10.5's Python is building  
extensions as UBs; it's just misnaming the eggs as ppc/i386.


>> OK, ta. Any advice on creating .eggs that will work for 10.5's  
>> brain-damaged Python install, both for PPC and i386? (While I have  
>> 10.4 on both PPC and i386, I have 10.5 on i386 only.)
>
> Patching the Makefile for python is probably the easiest way, that  
> is add '-arch i386 -arch ppc' to BASECFLAGS and LDFLAGS and set  
> UNIVERSALSDK to '/' (otherwise the architecture will be wrong). You  
> might also have to patch distutils to work around a bug in there.

Mmmmkay.

I've decided to cheat, building a universal .egg for user-installed  
Python 2.5 and separate 'ppc' and 'i386' eggs for Leopard Python (I  
don't have 10.5 on PPC, so I made myself a PPC-only python interpreter  
and it seems to create 'ppc' eggs okay under Rosetta.)


>>>> 2. I get the above traceback when easy_install tries to use the  
>>>> source-
>>>> based appscript. [...]
>>>
>>> My guess is that this a buglet in setuptools sandboxing code. Can  
>>> you build an egg using Apple's python and install that (that is  
>>> run 'setup.py bdist_egg' and then install that egg.
>>
>>
>> The following seems to work ok:
>>
>> cd appscript-0.18.0
>> /usr/bin/python setup.py bdist_egg
>> cd dist
>> /usr/bin/easy_install appscript*
>
> You might want to ask on distutils-sig at python.org about this.


The error itself is occurring when importing the skipjunk function  
from py2app, so it might be best if Bob takes a look first to see if  
the problem is at py2app's end.

In the meantime, I disabled the skipjunk-related bits from setup.py,  
and 'easy_install appscript' now works as intended. The bdist_mpkg  
option is broken, however (either due to removing that code or to  
other bugs), so I've just disabled the lot for now and slung up an  
0.18.1 update on PyPI (I've still to update the sourceforge site  
though).

Not entirely happy that I don't have a working binary installer  
available for Tiger's Python, but I don't have the time to be dealing  
with all this stuff right now (plus I just bought a new laptop and  
don't want to bounce it off the walls just yet). If anyone else has a  
bit of free time and wants to create a more satisfactory solution then  
be my guest; just drop us a note and I'll be happy to put it up.

...

Anyway, assuming there's no more reports of problems in the next few  
days I'll call py-appscript-0.18.x a done deal [1]. If folks here  
would like to try installing appscript via 'easy_install appscript' in  
the next day or two and let me know if there's any more problems then  
I'd really appreciate it.

Thanks again,

has

[1] Next step is 0.19.0, which is a significant stripping down and  
reorganisation of the current distribution and [hopefully] the long- 
awaited beta 1 release.
-- 
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org



More information about the Pythonmac-SIG mailing list