I believe the same idea could be extended to any module used, for example I could declare that my target system already has pyside or pywin32 installed, so no need to include it
On Mon, Apr 23, 2012 at 3:40 PM, Matteo Baracani <[email protected]> wrote: > The feature I want to develop is the possibility to choose whether to > bundle or not the system libpython. > If the target computer already has a libpython, adding it to application > is a waste of space. The idea is to add to PyInstaller the ability to > remove the standard library from the application and use the system > libpython. > > To develop this feature I'll work on builder and bootloader: the overall > plan is to have the builder not to bundle the libpython, and the bootloader > to use the system libpython. > > In class Analysis in module build.py it will be possible to pass a new > parameter called use_system_library whose default value is False (in this > case the build system libpython is bundled as usual), instead if the value > is True the application must use the system library and the libpython is > not included in the Analysis' results. Excluding the bundling of libpython > will be made after the function fixMissingPythonLib - after the invocation > of this function, we can be sure that the libpython has been located > somehow by the build system and that it's already scheduled for inclusion, > so it makes sense to just remove it from the Analysis' results at this > point. > > The choice whether to import or not the libpython is done in Analysis > because this phase is always done and doing this choice after that could > lead to code duplication, or to necessity to pass superfluous information > (e.g. an EXE with exclude_binaries=True doesn't need the list of binaries, > because COLLECT will collect them - so should I add this option as an > argument to EXE, I would still have to pass it the full list of binaries). > > To save this information I will not change the cookie structure, but > change the value in pyvers to negative if the user wants to use the Python > system library. > > In bootloader the idea is to change the loadPython function, so that > before throwing an error when not finding the bundled libpython, the > function checks the presence of a system libpython (how this search is > performed in detail depends on the operating system). In my planned > implementation the system libpython's version must match the same that > could be found on the build machine. If nothing is found the program throws > an error. > > If somebody wants to comment on the above, I'll gladly take your > suggestions into account during development. > > Matteo > > -- > 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 pyinstaller+unsubscribe@** > googlegroups.com <pyinstaller%[email protected]>. > For more options, visit this group at http://groups.google.com/** > group/pyinstaller?hl=en <http://groups.google.com/group/pyinstaller?hl=en> > . > > -- 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.
