[英]Distributing minimal python installation with application
My company is working on an application that is half Qt/C++ for the editor interface and half Django (via QtWebKit browser control) for the runtime. 我的公司正在开发一个应用程序,它为编辑器界面提供半Qt / C ++,为运行时提供半个Django(通过QtWebKit浏览器控件)。 What we want to do is distribute a minimal python installation with our application.
我们想要做的是用我们的应用程序分发一个最小的python安装。
For instance, our Mac app bundle would ideally be structured something like this: 例如,我们的Mac应用程序包理想情况下结构如下:
TheApp.app/
Contents/
MacOS/
TheApp
Resources/
MinimalPythonInstallation/
On Windows: 在Windows上:
C:\Program Files\TheApp\
TheApp.exe
MinimalPythonInstallation\
I've seen plenty of projects out there for distributing full Python applications such as py2app, py2exe, and PyInstaller. 我已经看到很多项目用于分发完整的Python应用程序,如py2app,py2exe和PyInstaller。 Those seem to have some of the features I'm looking for, but without the ability to just make a minimal python distribution.
这些似乎有一些我正在寻找的功能,但没有能力只做一个最小的python发行。 ie the python executable, Django, and the bare minimum of the python standard library needed by Django, our python code, etc.
即python可执行文件,Django,以及Django所需的python标准库,我们的python代码等等。
Is there anything out there that can do what I'm looking for? 那里有什么可以做我正在寻找的东西吗?
You can find the set of modules you need with modulefinder -- indeed, I believe that's a key part of what the systems you mention, like py2exe
and PyInstaller
, do for you, so I'm not clear why you want to "reinvent the wheel" -- care to clarify? 你可以通过modulefinder找到你需要的模块集 - 事实上,我相信这是你提到的系统的关键部分,比如
py2exe
和PyInstaller
,为你做的,所以我不清楚你为什么要“重新发明轮“ - 小心澄清? Have you looked at exactly what eg PyInstaller puts in the executables it generates, and, if so, why isn't that good enough for you? 你有没有看过PyInstaller在它生成的可执行文件中的确切内容,如果是这样,为什么这对你来说不够好? If you explain this in detail, maybe there's some extra way we can help.
如果你详细解释一下,也许我们可以提供一些额外的帮助。
(PyInstaller is cross-platform, so, if you want to support Mac as well as Windows, it's probably the one you'll want, since py2exe is Windows-only). (PyInstaller是跨平台的,所以,如果你想支持Mac和Windows,它可能是你想要的,因为py2exe只是Windows)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.