Search code examples
pythondjangopackaging

Package a django project and its dependencies for a standalone "product"


I've made a small little "application" utilizing Django as a framework. This is an application that is not maent to be deployed to a server but run locally on a machine. Thus the runserver.py works great.

I, as a developer am comfortable with firing up the terminal, running python manage.py runserver and using it.

But I have some Mac OS X and Windows friends wanting to use my application, and they don't have virtualenv, git or anything else.

Is there a way I can package this to be a standalone product? Of course it would depend on Python being installed on the system, but is it possible to package the virtualenv — with django and everything, and just copy it to another system and make it work?

And maybe even run the runserver in some kind a deamon mode?


Solution

  • Yes, you can package it. Django may not be the easiest to do this with, but the principles are the same for other frameworks. You need to make an installer that installs everything you need. And that installer needs to be different for different platforms. such as Windows, Ubuntu, OS X etc. That also means that the answer is significantly different for each platform, and only half of the answer is dependning on Django. :-(

    This kinda sucks, but that's life, currently. There is no nice platform independent way to install software for end users.