I eliminated the 1st of my problems by turning off argv_emulation.  That takes
care of the Evt.TickCount problem .  

But I am running afoul of the site-packages problem when I run the built app

I will repost as an new thread for clarity

m

On Jan 22, 2011, at 9:34 PM, michael ferraro wrote:

> Hello all and thanks for listening!
> 
> I have scanned the archive and the web for current practices in packaging an 
> Mac Python app with
> py2app.  I have been successful before (i.e circa python 2.4 and Mac OS X 
> 10.4).  I am now working
> on under 10.6.6 and python 2.6.6.18 as shipped with the OS.  I am  using PyQt 
> 4.8.2. as an i86_64
> app.  It runs fine from the terminal as
>       python Teatro.py
> 
> 
> I used 
>       easy_install-2.6 -U py2app which retrieved and installed py2app 0.5.2. 
> 
> I used a couple of variation of what seem to be standard procedure to create 
> the
> app including
>       /Library/Frameworks/Python.framework/Versions/2.6/bin/py2applet 
> --make-setup --alias --argv-emulation Teatro.py
> 
> followed by:
>       python setup.py py2app
>       python setup.py py2app -A
> 
> as well as
>       /Library/Frameworks/Python.framework/Versions/2.6/bin/py2applet 
> Teatro.py
> 
> the setup.py file looks like this:
> 
> """
> This is a setup.py script generated by py2applet
> 
> Usage:
>    python setup.py py2app
> """
> 
> from setuptools import setup
> 
> APP = ['Teatro.py']
> DATA_FILES = []
> OPTIONS = {'alias': True, 'argv_emulation': True}
> 
> setup(
>    app=APP,
>    data_files=DATA_FILES,
>    options={'py2app': OPTIONS},
>    setup_requires=['py2app'],
> )
> 
> when I try to run the app (Teatro.app or dist/Teatro depending on which 
> procedure I used
> to build it) i get this:
> 
> <Screen shot 2011-01-22 at 9.16.41 PM.png>
> 
> 
> The console reports:
> 
> 1/22/11 8:44:43 PM    com.apple.launchd.peruser.501[420]      
> ([0x0-0x51051].org.pythonmac.unspecified.Teatro[899]) Exited with exit code: 
> 255
> 1/22/11 9:16:30 PM    [0x0-0x5e05e].org.pythonmac.unspecified.Teatro[982]     
> Traceback (most recent call last):
> 1/22/11 9:16:30 PM    [0x0-0x5e05e].org.pythonmac.unspecified.Teatro[982]     
>   File 
> "/Users/mef/Development/-Applications-/Teatro/Teatro.app/Contents/Resources/__boot__.py",
>  line 103, in <module>
> 1/22/11 9:16:30 PM    [0x0-0x5e05e].org.pythonmac.unspecified.Teatro[982]     
>     _argv_emulation()
> 1/22/11 9:16:30 PM    [0x0-0x5e05e].org.pythonmac.unspecified.Teatro[982]     
>   File 
> "/Users/mef/Development/-Applications-/Teatro/Teatro.app/Contents/Resources/__boot__.py",
>  line 101, in _argv_emulation
> 1/22/11 9:16:30 PM    [0x0-0x5e05e].org.pythonmac.unspecified.Teatro[982]     
>     _get_argvemulator().mainloop()
> 1/22/11 9:16:30 PM    [0x0-0x5e05e].org.pythonmac.unspecified.Teatro[982]     
>   File 
> "/Users/mef/Development/-Applications-/Teatro/Teatro.app/Contents/Resources/__boot__.py",
>  line 40, in mainloop
> 1/22/11 9:16:30 PM    [0x0-0x5e05e].org.pythonmac.unspecified.Teatro[982]     
>     stoptime = Evt.TickCount() + timeout
> 1/22/11 9:16:30 PM    [0x0-0x5e05e].org.pythonmac.unspecified.Teatro[982]     
> AttributeError: 'module' object has no attribute 'TickCount'
> 1/22/11 9:16:30 PM    Teatro[982]     Teatro Error
> 
> 
> When I build using 
>       python setup.py py2app Teatro.py without alias and argv_emulation in 
> the setup.py
> 
> 
> /usr/bin/strip: for architecture x86_64 object: 
> /Users/mef/Development/-Applications-/Teatro/dist/Teatro.app/Contents/Frameworks/Python.framework/Versions/2.6/Python
>  malformed object (load command 3 cmdsize not a multiple of 8)
> stripping saved 333408 bytes (8961700 / 9295108)
> 
> as the last line of the build and in the build directory i get
>       dist.macosx-10.5-intel/
> 
> but away get the same result as above when I try to run the app
> 
> 
> 
> I am sure it is obvious what is wrong but I have reach a dead end.  
> 
> Any help would be appreciated
> 
> 
> Michael Ferraro
> Assoc. Prof. 
> Art Dept.
> Lehman College CUNY
> Bronx, NY
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to