views:

63

answers:

1

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. What we want to do is distribute a minimal python installation with our application.

For instance, our Mac app bundle would ideally be structured something like this:

TheApp.app/
   Contents/
      MacOS/
         TheApp
      Resources/
         MinimalPythonInstallation/

On 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. Those seem to have some of the features I'm looking for, but without the ability to just make a minimal python distribution. i.e. the python executable, Django, and the bare minimum of the python standard library needed by Django, our python code, etc.

Is there anything out there that can do what I'm looking for?

+2  A: 

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? Have you looked at exactly what e.g. PyInstaller puts in the executables it generates, and, if so, why isn't that good enough for you? 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).

Alex Martelli