On 2/29/08, Nathan <[EMAIL PROTECTED]> wrote:
>
>  Hmm.  No matter what I try, when I build my app with py2app, it fails with:
>
>  Traceback (most recent call last):
>   File 
> "/Users/nathan/Sites/running-man/dist/running-man.app/Contents/Resources/__boot__.py",
>  line 156, in <module>
>     _run('running-man.py')
>   File 
> "/Users/nathan/Sites/running-man/dist/running-man.app/Contents/Resources/__boot__.py",
>  line 153, in _run
>     execfile(path, globals(), globals())
>   File 
> "/Users/nathan/Sites/running-man/dist/running-man.app/Contents/Resources/running-man.py",
>  line 6, in <module>
>     from twisted.protocols import amp
>  ImportError: cannot import name amp
>  2008-02-28 17:53:49.725 running-man[1397:10b] running-man Error
>  2008-02-28 17:53:49.728 running-man[1397:10b] running-man Error
>  An unexpected error has occurred during execution of the main script
>
>  ImportError: cannot import name amp
>
>
>  ....and yet I've manually verified that the twisted code, including
>  twisted/protocols/amp.py are inside the .app bundle.

I was messing around with py2app a bit today and ran into similar
quirks.  Some tips that might help:

Delete the build and dist directories before running py2app; it
doesn't seem to detect out-of-date half-built files very well, and
ends up building corrupted bundles.

If you're trying to get a module or package added into the bundle
that's normally loaded dynamically (and so doesn't get picked up by
py2app's module finder) -- for example, the pyglet.media.drivers.*
modules -- you can trick it by adding something like this to your
script file:

if False:
    import pyglet.media.drivers.openal
    import pyglet.media.drivers.silent

etc.  This obviously has no effect on the program, but is good enough
to fool py2app; and is easier than trying to specify these packages on
the command line or in a setup.py.

Alex.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to