Don Dwiggins wrote: > I'm a current user of py2exe, and am experimenting with PyInstaller > as > a possible replacement. I'm on WinXP using Python 2.4 and wxPython > 2.6.3.2.
Sorry for being late on this. I don't have much time for PyInstaller right now :( > I've succeeded in created a single-file executable in a distribution > directory that has an "aux_files" subdirectory containing some data > files. However, I've run across a few problems with PyInstaller 1.1 > that I thought it worth mentioning: > > 1. The config.dat generated by Configure.py had the following line: > 'hasUPX': (1, 94), > This caused Build.py to fail, since it was expecting that key to have > an integer value; I changed it to > 'hasUPX': 1, > and it worked OK. Should I submit a ticket for this? This is fixed on trunk already, sorry about that. I should have made a quick-fix release for this... > 2. I use EnsureDispatch in my app, and encountered a problem that's > described in Ticket #41. By making the patches shown in the ticket, I > was able to get a successful build, and have run the application on > the build machine and a test machine without Python installed. I'm not familiar with win32com enough. I had a quick look at the patch in that ticket but there was something that was concerning me at the time... Would you please add a note to that ticket, saying that the patch also worked for you? So I'll remember to check better :) > 3. In attempting to create the directory structure I mentioned above, > I defined a COLLECT instance referencing the files in the > subdirectory, > then passed that to a second COLLECT for the distribution directory; > this one looks like > dist = COLLECT(exe, aux, name='pyi_dist') > This gave a traceback using Build.py on it. Looking at it in the > debugger, it seems that COLLECT wants its args to have a value for the > "typ" attribute, but the COLLECT class doesn't define that attribute. > I suspect that I went about this the wrong way, but you might want to > note > in the manual that COLLECT args can only be instances of certain > subclasses of Target (unless I've misunderstood this completely). Well, I think that the problem is that COLLECT acts like a TOC but it is not a TOC. In fact, it contains a self.toc attributes. Tree, instead, acts like a TOC but it *is* a TOC. This is why it works passing a Tree to COLLECT but not another COLLECT instance. If you want to attempt something (please :), I think you should make it so COLLECT derives from both Target and TOC, just as Tree does. This way, it should naturally be possible to embed COLLECTs within other COLLECTs. Now besides the technical merit, I am not sure what it buys you to run two collects in a row, since each collect is a physical copy of files... > I was able to get close to what I want by using a Tree for the aux > files, adding > prefix='aux_files/' > to get the files into the appropriate subdirectory of the > distribution. This gave me everything in the subdirectory, however. > What I'd like > here is an 'includes=' option, since I only want one file from there. > Any suggestions? If you want a single file, you don't need neither a COLLECT nor a Tree. You can simply specify it as [(name, path, typecode)]. See the manual http://pyinstaller.hpcf.upr.edu/docs/Manual_v1.1.html#toc-class-table-of-contents about how to add a single file to an existing TOC. If you want to provide a patch to specify specific glob/regexp patterns as "includes" to Tree, I'm fine, as soon as it is semantically clear that Tree is a way to automatically make a TOC out of a "large" tree of elements. Adding single files is much easier than that. Thanks for your great feedback! -- Giovanni Bajo _______________________________________________ PyInstaller mailing list [email protected] http://lists.hpcf.upr.edu/mailman/listinfo/pyinstaller
