Saturday, 7 September 2013

How to distribute a stand-alone python application?

How to distribute a stand-alone python application?

I want to distribute my Python application to co-workers for them to use.
The application will on be run on Linux systems, but the users do not have
admin privileges so cannot install my application's module dependencies. I
would the users to be able to untar my application and then run my main.py
script. Running another one-time 'install'-type script is okay, but not
much else.
PyInstaller is close to what I want. Except I would like to distribute the
source code of my application as well. So the application should be
stand-alone and self-contained (with or without the python interpreter is
fine, preferably with), but users should be able to make small changes to
the code and rerun the application. My ideal solution is to create some
sort of compressed/compiled archive of all my applications module
dependencies and distribute that with my application. It doesn't have to
be all dependencies, but at least the non-standard packages. The
application will then import modules from this archive instead of the
user's PYTHONPATH.
I tried virtualenv, but having the users source the activate script was a
little too much. I've been looking into numerous other solutions, but I
can't find one that works for me.

No comments:

Post a Comment