冻结 Python 应用程序时创建更少的文件
我正在使用 cxFreeze 冻结我的 Python 应用程序。一切似乎都按预期工作,但查看构建目录让我思考......
有没有办法可以在构建目录中拥有更少的文件?
目前,有一堆 PYD 文件和必要的 DLL 文件。然后我有一些配置文件(自定义),其余的内容被放入library.zip 文件中。有没有一种方法可以将几乎所有内容都捆绑到library.zip 文件中,这样我就可以减少其中的文件数量?
(这似乎更像是一个干净的目录迷恋,而不是一个真正的“问题”,但尽管如此,有时你只需要满足好奇心/迷恋)
非常感谢大家(提前)。
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?
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).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
PyInstaller 也是跨平台的,并且比 cx_Freeze 有更多功能,但不支持 Python 3。参见还有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.