How to distribute a Python app together with its dependencies?
kyosohma at gmail.com
Mon Dec 1 15:21:37 CET 2008
On Nov 30, 6:22 am, Alessio Pace <alessio.p... at gmail.com> wrote:
> I have to distribute a Python application which relies on an external
> library, and I'm not very fluent in this kind of stuff with Python (I
> come from the Java world where I would have used the Maven build tool
> to create an "assembly with dependencies" of all it is needed to run
> the app), so I was wondering if someone here could give me some
> suggestions :-)
> The external library is generally not present on the machines where I
> have to distribute my app, and the set of machines on which I have to
> distribute this application is not known a priori (it is just known
> they are Unix systems). In fact by means of SSH I will have to copy
> (and install) the app+library and make it runnable onto the specified
> My question is: how would you do that? At the moment my current
> solution is to make a tarball of the sources of my app + the
> "distutils" archive of the external library, copy all into the target
> machine, decompress and install via distutils(*) the external library,
> setup some PYTHONPATH stuff on the destination machine, and finally be
> able to launch the application.
> (*) specifying a prefix into the user home, as I'm not root there
> So in the end I was wondering if there is a more elegant way of doing
> this because, as I said before, I'm not very experienced in these kind
> of tasks in Python.
> Thanks in advance for any suggestion or comment.
> Alessio Pace.
I recommend GUI2Exe, a nice wrapper to py2exe, py2app, PyInstaller,
cx_Freeze and bbFreeze:
I've only used the py2exe portion of the program, but it works great
and the developers behind the project are very responsive and helpful.
More information about the Python-list