The py2app documentation mentions presets executed by __boot__.py before the main python script. I could not find a way to easily specify any predicate in the setup.py file or the build process.
However, I managed to “hack” __boot__.py manually and add another _run(prescript) command to my main _run(main_script) , and it seems to work fine. However, it would be much better to use the standard py2app build process.
What I'm essentially trying to do is monkey-patch my sites-packages.zip file before running the main script. The prescription basically checks for updates on the server, and if so, downloads them, and then overwrites the site-packages.zip file. Much faster than reinstalling the application from scratch.
Any ideas?
source share