[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Pypack



On 9/29/06, Jasper <jasper@xxxxxxxx> wrote:
Carrying over from the previous thread about py2exe, etc.  I've messed
around with Pypack some more, and now recall what turned me off initially.

1) The script to use is called pypackage.py, but the docs and comments
refer to it as pypack.  Easy enough to fix, but makes it immediately
clear this is alpha code.  Hence my reticence to dig far.

Yes, this needs to be implemented more elegantly. Originally the problem was that the script "pypack" conflicted with the package called "pypack", but that shouldn't matter anymore, now that pypack is properly installed to site-packages. However, there is a pypack.bat file that is supposed to enable you to call "pypack" (instead of pypackage.py) on Windows.

But you are right, PyPack is still very much an alpha product. This is
a problem area where anticipating all the use-cases and configurations
is very difficult. It has worked in my own projects so far, but
feedback like this will hopefully help it to grow more mature and
useful.

Sure enough, when I look under the "extlib" dir tree, reactor.pyc is
missing.  So Pypack apparently missed a static import from my starting
script -- the 3rd thing I import.  My confidence is not high after
seeing this, but I gamely copy over reactor.pyc by hand, and ...

I presume you succesfully ran the tracing step and got the .trace file? If you can email this file to me, it might help me debug the problem.

But now I find that twisted.python.threadpool.pyc is missing, because
twisted.internet.base imports it dynamically.  I would guess this is to
avoid Python's refusal to handle circular imports, which is something
I'm also forced to do... I copy threadpool.pyc, and then realize that
everything threadpool imports I'll also have to manually deal with, or
change my code to force import...

This is really strange, since these kind of things are exactly why I decided to use run-time analysis instead of static. The trace step should catch all these dynamic imports. I'll have to do some testing with twisted, in case it does something funny with sys.modules.

Clearly I need someway to manually include certain things, but the
Pypack docs give no indication of how to do this...  Is there a way to
force Pypack to import missing things?  I don't know, and so I'm back to
futzing with py2exe, for which my .exe is presently looking for
datafiles in a different place than py2exe put them.  :-(

I'm sorry that you had such a bad experience and wasted your time. PyPack has worked so flawlessy in my own projects, that I was confident it would already by at a usable state for others too. Were you using the 0.2 version or the trunk from SVN? The SVN version contained quite a lot of fixes that I've now released as version 0.3.

Is the project you are working on going to be open source? I would
like to try packaging it myself to find out what is causing all the
problems you are experiencing.

--
Sami Hangaslammi