I've created ticket #547, and just added a comment to it, to the effect that I've found and fixed the problem that caused an analysis to be repeated even when the .toc file hadn't changed. For convenience, here's the comment:

I've looked further into this, in particular the message "building because xxx-Analysis.toc is bad". This message comes from Target.get_guts. Logging the contents of self.GUTS and the data read in, I discovered that GUTS has 10 elements, while the list in the .toc file has only 9.

This discrepancy is caused by the assignment to "newstuff" in Analysis.assemble (line 531 in build.py), which doesn't have an element for 'hiddenimports'. Patching in 'self.hiddenimports' as the last element solves the problem -- on a subsequent build with no changes to the .toc file, the analysis phase is skipped.

There's still the question of why it takes so long for Microsoft.Windows.Common-Controls, and whether that processing could be done on installation (and possibly updated separately when that changes), but the above patch is sufficient for my work.

... and here's the diff listing on my machine (on branch fix_merge_case):
@@ -525,11 +525,12 @@ class Analysis(Target):
             oldstuff = None

         self.pure = TOC(compile_pycos(self.pure))

newstuff = (self.inputs, self.pathex, self.hookspath, self.excludes, - self.scripts, self.pure, self.binaries, self.zipfiles, self.datas) + self.scripts, self.pure, self.binaries, self.zipfiles, self.datas,
+                    self.hiddenimports)
         if oldstuff != newstuff:
             _save_data(self.out, newstuff)
             wf = open(WARNFILE, 'w')
             for ln in importTracker.getwarnings():
                 wf.write(ln + '\n')

I'll leave it to the maintainers to review and commit the change. (By the way, it looks like this is independent from the MERGE facility -- it seems as thought it should affect all builds.)


On 4/4/12 10:01 AM, Martin Zibricky wrote:
Please create a ticket for that to have all your findings at one place. Someone else has to step in since I do not know much about the MERGE part.

--

Don Dwiggins
Advanced Publishing Technology


--
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.

Reply via email to