On 3/5/08, Drew Smathers <[EMAIL PROTECTED]> wrote: > > On Tue, Mar 4, 2008 at 7:26 PM, Nick Miller <[EMAIL PROTECTED]> wrote: > > > > Hello, > > > > This is my first post to this mailing list but I had a real quick > question. > > > > I found pyglet a few days ago and so far I really like using it. It's > > much better than similar libraries I've seen like it. Anyway, I > > attempted to compile the NeHe OpenGL ports with py2app. Everything went > > fine except that the final .app size was around 14.5mb. And this was > > only with a colored triangle and square. Is this normal or is there a > > way around this?
Right click on the generated .app file, click Show Package Contents. Then navigate to Contents/Resources/lib/python2.5. These are the modules and packages that py2app has decided your project needs. In my experience it includes far too many by default which are never referenced. The current SVN trunk builds an astraea.app of around 10Mb, of which 1Mb is the site-packages.zip (some redundant modules in here), and 5.6Mb in lib-dynload (definitely some in here that aren't needed as well: crypto, codecs, carbon bindings, sockets, parser, ...). I haven't found a good way to remove these packages from py2app; it doesn't seem to fit into the distutils core and uses its own module discovery module in place of the stdlib one. There's a good project here for an interested somebody: either patch/hack py2app to include only the modules necessary for pyglet; or write a better module discovery algorithm; or write a clean py2app implementation from scratch (the existing one looks overly complex to my eye, for what it does, which is making it tricky for me to hack). > > Ahh, yes. You can try solve your problem the good old fashion way. A > binary search on the symptoms is what I suggest. First try removing > the triangle and building your .app again. If not significantly > smaller, put the triangle back and this time remove the square. Build > the .app again. Compare results. Try removing both. I don't think this is a very useful suggestion. 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 -~----------~----~----~----~------~----~------~--~---
