[python-win32] Re: py2exe and module dependencies

Thomas Heller theller at python.net
Fri Oct 22 15:29:43 CEST 2004


David Fraser <davidf at sjsoft.com> writes:

> Thomas Heller wrote:
>
>>By accident, I've just hacked in py2exe a little more, and it can now
>>create a HTML page explaining module dependencies. Inspired by Toby
>>Dickenson's code http://www.tarind.com/depgraph.html.
>>The results are quite nice, imo, and hopefully I can release 0.5.4 even
>>this night.
>>
> Hi Thomas
>
> Not meaning to be rude, but I must say that the code does have
> problems with complex modules (won't work with my code :-)).
> But then again, py2exe does too...

You mean, py2exe *has* problems with your code?

> are you using his module dependency finders or the standard py2exe
> system?

py2exe uses the standard Python's modulefinder.  If it has problems with
some code, it may be a bug.  Toby has simply overridden some methods, so
that dependencies are collected - that's what I also use, plus I format
a html page from the results.

> Anyway module dependency description would be quite helpful for
> resolving unneeded dependencies in py2exe

Yes, that's the use case.  With the html page full of links, it's easy
to answer questions like
- why the hell is this module included?
- is that module really needed (for pure Python modules, the html page
has a link which show the .py file in the browser)

Anyway, I haven't yet looked at the module that Bob Ippolito has written
for py2app, maybe it works better than modulefinder, and it can be used
in the future for py2exe too.

Thomas



More information about the Python-win32 mailing list