Andreas Jacobsen’s Distraction

Another cause of procrastination

Bruce Eckel announces build.py

with 8 comments

Here was me complaining about the lack of good build tools for Python and in a wonderful synchronicity Bruce Eckel’s gone and made a new one. The post is part of a longer series on Python decorators, which is worth reading in its own right.

Aside from the unfortunate name (can we hope it gets changed to something more googlable?), the tool looks interesting. The basic idea is to use decorators to define rules and plain Python functions to fulfill them. It looks based on the older style build tools (like Make, Ant and Rake) where one uses recipes to build rather than inferring targets from project structures and compiler configurations (like Maven and Buildr). This isn’t necessarily bad, as it gives more finegrained control of what happens as a part of a build.

The key feature that build.py brings from Rake is that the build tool allows you to use a fully featured programming language to define how tasks are executed. This is important for allowing users to create tasks that aren’t predicted by plugin makers for the original build tool.

This is still just the first release, and it should be more fleshed out as he finishes the Python book he’s using build.py for. I look forward to seeing future developments and adoption.

(Incidentally, someone mentioned Vellum in the comments on the post. It’s probably worth looking into as well.)


Written by Andreas

October 29, 2008 at 10:45 am

Posted in Python

Tagged with , ,

8 Responses

Subscribe to comments with RSS.

  1. For completeness, you probably also want to look at zc.buildout, which aims to do more than just Python, but which has lots of useful Python-deployment recipes already.

    James Bennett

    October 29, 2008 at 4:09 pm

  2. If you’re looking at Vellum and zc.buildout, you’ll probably also want to look at Paver and pip. This is an area of a lot of activity lately–hopefully the common will gel around a couple of the better tools.

    Michael Greene

    October 29, 2008 at 4:37 pm

  3. Wow, I didn’t realize there were so many alternatives. My googling a couple weeks ago only really turned up buildutils and Vellum. Thanks for the pointers. I’m already trying to think up a new Python project to try these out on now…

    Andreas

    October 29, 2008 at 4:40 pm

  4. There is also a tool called Fabric[1], more focus on deployment but you can use it as build tool anyway

    [1] http://www.nongnu.org/fab/

    number5

    October 29, 2008 at 5:45 pm

  5. Fabric looks good for managing deployment, but I don’t quite get why some of the examples use Maven2, which has its own ways doing pretty much everything the examples do.

    Andreas

    October 29, 2008 at 8:24 pm

  6. While we’re at Python build systems:
    Have a look at “waf”[1] – A portable and efficient build system for building (heterogeneous) projects written in different languages (ie C++ w/ Python w/Ocaml). Also makes extensive use of decorators. Quite mature and very well worth the effort of looking into it.

    [1] http://code.google.com/p/waf

    Petar Forai

    October 29, 2008 at 11:16 pm

  7. Given all the alternatives, I’m beginning to wonder why, aside from the exercise, Bruce Eckel is rolling his own…

    Andreas

    October 30, 2008 at 2:58 pm

  8. There’s also SCons.

    Heikki Toivonen

    October 31, 2008 at 1:10 am


Leave a Reply