Ümit Öztosun wrote: > I'am developing a non-trivial application which does lots of dynamic > imports. Currenly, each module is imported from a zip file, which is > dynamically inserted to sys.path at runtime. > > As stated in the manual, this does not work with pyinstaller. It would > be great if this was possible, because I really want to deploy > pyinstaller's single file executables (mostly on Windows). I should > note that it is not possible to unpack these zip files on the fly, > because of our (own) platform limitations.
Hi Umit. I am not sure I understand very well your needs. For zipimports (as in: being able to import modules from within a zipfile/egg-file), what needs to be done is to change Build.py (the script you run to build the executable) so that it can find imported modules from within zip packages in the sys path. You would then have to add all those zipfiles to the system path (see argument 'pathex' in the Analysys call in the spec file). At build time, Build.py would extract the .py files from within the zips and *embed* them within the executable. Thus, to be absolutely clear, the modules that you store in zipfiles would be bundled within the executables *just like* they came from the standard filesystem. It's only that the build system would be instructed to look for modules within zipfiles too. The above paragraph is basically what will happen when PyInstaller will gain support for zipimports / eggfiles. I am not sure if this is what you want, since you speak of "lots of dynamic imports". I believe you should explain better your scenario if you need another answer. Giovanni Bajo _______________________________________________ PyInstaller mailing list [email protected] http://lists.hpcf.upr.edu/mailman/listinfo/pyinstaller
