py2exe: Reduce size of the library archive

邮差的信 提交于 2020-01-01 05:34:06

问题


I just created my first py2exe executable and noticed that with the EXE, there is a ZIP file created with the size of around 1.4 MB.

My question is, can I reduce the size of this or is it expected that the typical size of an EXE generated with py2exe will be ~ 4 MB (that means with all the files: python2.6dll, library.zip)


回答1:


Short answer to your size reduction question is yes. Long answer I am not going to provide here, but instead direct you to py2exe's OptimizingSize wiki page.

I hope this helps ;)




回答2:


After changing those setup.py parameters i also run UPX on DLLs and executables and repack library.zip with 7-zip, works well.

By the way, there is a page on the wiki about using UPX and 7-zip.



来源:https://stackoverflow.com/questions/3528763/py2exe-reduce-size-of-the-library-archive

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!