On Tuesday 13 of October 2015 13:50:52 davecortesi wrote: > Surveying existing hooks, I wrote, > > > Only 4 hooks assign to excludedimports. > > to which Hartmut G. replied, > > > These need to be converted into pre-safe-import hooks, I assume.
'excludedimports' is broken in Pyinstaller 3.0. Related issue: https://github.com/pyinstaller/pyinstaller/issues/1584 I think that 'excludedimport' api for hook will be kept just the implementation will be different. Hartmut, is this correct? > > I am only now looking closely at the code to call any > pre_safe_import_module() type of hook. It appears the purpose of these is > to add nodes to the Modulegraph, because Modulegraph will not detect > dynamically-created imports. That is what the existing hooks (gi.repository > and six.moves) do. > > How does this -- ADDING nodes -- relate to the excludedimports global which > is about REMOVING nodes? > > Does this mean that excludedimports no longer works? It works to some extend: - It prevents bundling conditional libraries: e.g. PIL does not bundle gui libraries. - broken is, that the conditional libraries, are not bundled when they are used, even when you import them directly in your code! The current implementation for processing excludedimports is complex and removes already created nodes from the module dependency graph. > > OH NOZE! (insert picture of kitten with paws over its eyes) > > I am doing a multifile search and the word "excludedimports" no longer > appears anywhere except in those 4 hooks and the manual! > > In particular it does not appear in Analysis.py. AGGGHHHHH! (Insert "The > Scream" emoji) > > Enlightenment desperately needed here... Current implementation is in module PyInstaller.building.imphook. -- Martin Zibricky -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyinstaller. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: This is a digitally signed message part.
