On 11/27/2008 5:24 PM, Antonio Valentino wrote: > On 24 Nov, 15:08, Giovanni Bajo <[EMAIL PROTECTED]> wrote: >> It's a known bug. We'll get at it, eventually. If anybody wants to help >> fixing it out, I can provide directions. > > Hi Giovanni, > I can't find any bug report about this on the trac. Can you point me > to it please?
It's not tracked, I was just aware of it. > I'm not sure I have the skill to help in this case. Anyway if it > doesn't waste too much your time I would like to know something more > about this bug. Since it's impossible to know which plugins are really used by the application, the most correct and safe solution is to include all of them. This is a common need; there are other packages containing data files/trees that need to be available at runtime. Matplotlib comes to mind. So I would like to work towards a reusable solution where PyInstaller can easily add support for more packages with the same requirement. We basically need to do these steps: 1) A way to write an import hook that declares a list of files/directories (trees) that need to be part of the final distribution. For single-dir projects, it's sufficient to copy them over; for single-file projects, we need to add them within the archive contained in the executable. 2) A modification to the bootloader so that, in case of the single-file setups, those files are unpacked at startup within the temporary directory. The bootloader already does this for the binary files, but I'm not sure if handles full trees of files (it should build directories, etc.). [An alternative would be to unpack these data files from Python at startup, within one of the standard startup scripts] Of course, some packages will also need a runtime hook to "register" those data files. For instance, I expect that for PyQt4 you will need a runtime hook that at startup will call QCoreApplication::addLibraryPath(). But this of course can be done incrementally. The good news here is that most of this code is already available: in fact, PyInstaller does something similar for Tcl/Tk support. It's a special code within PyInstaller, but it should be generalized to use the framework described above. For instance, you can have a look at "support/unpackTk.py" which does the unpacking of embedded data files. -- Giovanni Bajo Develer S.r.l. http://www.develer.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "PyInstaller" 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/PyInstaller?hl=en -~----------~----~----~----~------~----~------~--~---
