I’ve been working all day on making the installation script for Courant, and am now writing the documentation files. So I thought I’d take a few minutes to summarize the process in anticipation of release in the coming week.
For your techies, some background: We have been using Subversion (svn) for source control, but there’s been a push to move towards git. The biggest holdup had been our dependence on svn:externals to pull in some other projects without having to fork them, which is a pretty poor reason. As a result, I’ve been seeking ways to get rid of that last vestige of svn so that we could allow people to use git if they prefer that. We intend to continue using svn for Courant’s core codebase, but we appreciate the fact that many devs prefer to use git for their workflow, so we don’t want to preclude that.
As a result, I’ve been seeking a solution to simultaneously get rid of svn:externals while also easing the process of installing and using Courant. Some posts by the famous djangonaut James Bennett, along with looking at projects like Pinax, convinced me that such a solution existed in pip with virtualenv. Virtualenv allows you to create an isolated environment on your computer in which you can install python packages without it polluting the rest of your system, while pip allows you to install python packages from the Chesseshop or from a repository (supports svn, git, bzr, and hg currently).
Now for everyone: To use Courant, you first have to install python (2.5 recommended), svn, git, and whatever database engine you’d like to use (we strongly recommend PostgreSQL, but MySQL works too). From there, you just download one file from the Courant servers, courant-boot.py. Running courant-boot.py with some options will install Courant and all of its python dependencies, including Django and many others, inside a fresh virtualenv. It can also set up a clean copy of our sample project, or it can checkout your own site project from an external repository.
python courant-boot.py myvirtualenv -n website -p default
That one command will create a new virtualenv called “myvirtualenv,” install everything, and make a copy of the “default” sample project in a folder called “website.” For the YDN, I can replace “default” with the URL to our private SVN repository, and it will check out the Courant-powered version of our site and be all ready to go. I don’t think it could be much simpler. It should work perfectly well across all the major operating systems, and I have personally tested it on Ubuntu and Windows. I’ll get Paul to verify it works on OSX before release.
More detailed installation instructions, including a number of other options and instructions for how to set things up for developing on Courant itself, will be included in the project documentation. This was one of our last hurdles before public release, so once we finalize some remaining details and get team consensus, we will be opening up the project site. Stay tuned.