py2app prescripts
Posted
by yoav.aner
on Stack Overflow
See other posts from Stack Overflow
or by yoav.aner
Published on 2010-03-30T11:10:12Z
Indexed on
2010/03/30
11:13 UTC
Read the original article
Hit count: 536
The py2app documentation mentions prescripts, being run by __boot__.py
prior to the main python script. I couldn't find a way to easily specify any prescript on the setup.py file or build process.
I did however manage to 'hack' __boot__.py
manually and add another _run(prescript)
command before my main _run(main_script)
and it seemed to work fine. It would however be much better using the standard py2app build process.
What I'm essentially trying to do is monkey-patch my sites-packages.zip file prior to the main script being launched. The prescript essentially checks for updates on the server, and if there are any, downloads them, and then overwrites the site-packages.zip file. Much quicker than having to re-install the application from scratch.
Any ideas?
© Stack Overflow or respective owner