Djangorecipe updated for the upcoming buildout 2.0

Tags: django, buildout

zc.buildout 2.0 is almost finished (the 2.0 beta 1 came out last week). It is mostly a simplified 1.4.4 zc.buildout that is better maintainable. Simplifications include only supporting distribute instead of also setuptools. And not supporting multiple python versions within one buildout: the one you run buildout with is the one that gets used. And it loses the 1.5/1.6/1.7 complexity of selective isolation from system packages.

It also gains some stuff like better defaults. And my patch :-), so it supports distutils-style scripts, too. Handy for installing pyflakes and docutils. And, as I discovered a week ago, you can also let it install all scripts of all required packages with the dependent-scripts = true setting.

Anyhow, time to update djangorecipe, as there was a small change in the way buildout 2.0 calls a recipe. Not many recipes will be bitten by it: you don’t get passed the python executable anymore. This is only useful when you want to use a different python from the one you run your buildout with.

So… I could simplify the code, too, by throwing out support for different python versions :-)

Good python 3 news!

  • The upcoming django 1.5 (at release candidate status now) works with python 3. Not recommended for production use yet, because external packages for connecting to specific databases might not work yet, but django itself is ready.

    (Personal grumble: why oh why don’t they provide their release candidate on pypi? I have to download and install a TGZ… Update: I got a comment from Jacob below. The problem is that pip/easy_install doesn’t look at alpha/beta/rc, but just installs the highest number. So if Django puts an 1.5alpha on pypi you see a spike in support requests right away… I’m too used to buildout with its default “prefer-final” option: buildout only uses stable releases unless you tell it otherwise.)

  • Buildout 2.0 supports python 3!

  • Djangorecipe also supports python 3.

The proof can be observed on a travis-ci build page. The buildout 1 tests are run with django 1.4, the buildout 2 tests with 1.5rc1.

  • Both work on python 2.6 and 2.7.

  • Buildout 1.x and django 1.4 also work on python 2.5.

  • Buildout 2 and django 1.5 also work on python 3.2!

So… now I have to acknowledge that I’m solidly on python 2.7 still… Django 1.5 in combination with python 3 would be an excellent opportunity to move over and do some cleaning-up.

 
vanrees.org logo

Reinout van Rees

My name is Reinout van Rees and I program in Python, I live in the Netherlands, I cycle recumbent bikes and I have a model railway.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):