冻结Python应用程序时创建更少的文件 [英] Creating fewer files when freezing a Python application
问题描述
我正在使用cxFreeze冻结我的Python应用程序。一切似乎都按预期工作,但是凝视构建目录让我开始思考...
I'm using cxFreeze to freeze my Python application. All seems to be working as expected but peering into the build directory got me thinking...
有没有一种方法可以减少构建目录中的文件?
Is there a way I could have fewer files in the build directory?
当前,周围有很多PYD文件和必要的DLL文件。然后我有一些配置文件(自定义),其余的东西都扔进了library.zip文件中。有没有一种方法可以将几乎所有内容都捆绑到library.zip文件中,从而使其中的文件更少?
Currently, there's a bunch of PYD files and the necessary DLL files lying around. Then I have some configuration files (custom) and the rest of the stuff is thrown into a library.zip file. Is there a way I could bundle pretty much everything into the library.zip file so I could have fewer files in there?
(这似乎是一种更好的方法-干净的目录恋物癖比真正的问题要好,但是尽管如此,有时您还是要满足好奇心/恋物癖。)
(This seems to be more a-nice-clean-directory fetish than a real "issue" but nonetheless, sometimes you've just got to fulfill the curiosity/fetish)
(提前)感谢一吨大佬。
Thanks a ton guys (in advance).
推荐答案
PyInstaller 也是跨平台的,并且比cx_Freeze具有更多的功能,但不支持Python3。另请参见 py2exe-生成单个可执行文件。
PyInstaller is cross-platform too, and has more features than cx_Freeze, but doesn't support Python 3. See also py2exe - generate single executable file.
这篇关于冻结Python应用程序时创建更少的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!