As we know, py2exe options have to be tweaked in various ways for various extensions. This burden is currently put on the py2exe users shoulders. However, the extensions developers usually know better what exactly has to be tweaked and it's not like they don't know about the existence of py2exe.
Therefore, I think, py2exe should expose some interface for the extensions it scans to let it know what exactly has to be included in the application package for the extension to work. Currently I don't see any way to accomplish this.
One solution I thought about was to scan all the packages found by the modulefinder to see if they include a special "__py2exe__.py" module. If they do, this module would define extra options for the package it is in. Additional "includes" and "excludes" as well as other options or even functions or classes could be defined there. It would be even possible to include these files for the packages in the standard library in the py2exe installation, so that no more tweaks would be required for the standard packages.
In my opinion, this would be quite easy to implement and would open up a whole new world of possibilities to even more improve the reliability of py2exe.
What do you think?
Log in to post a comment.