Python "make" like tools (was Re: [ANN] DoIt 0.1.0 Released (build tool))

Ville M. Vainio vivainio at gmail.com
Mon Apr 21 10:51:23 EDT 2008


Eduardo Schettino wrote:

> DoIt is a build tool that focus not only on making/building things but on
> executing any kind of tasks in an efficient way. Designed to be easy to use
> and "get out of your way".

I took a look at dolt syntax, and saw this:

QQQ

def create_folder(path):
     """Create folder given by "path" if it doesnt exist"""
     if not os.path.exists(path):
         os.mkdir(path)
     return True

def task_create_build_folder():
     buildFolder = jsPath + "build"
     return {'action':create_folder,
             'args': (buildFolder,)
             }

QQQ

Wouldn't it be more convenient to provide syntax like this:

@task("create_build_folder")
@depend("dep1 some_other_dep")
def buildf():
  buildFolder = jsPath + "build"
  create_folder(buildFolder)

I find the doit syntax a bit cumbersome, especially as you can avoid 
'args' by just returning a lamda in 'action'.

I've looked around a bit for python "make" replacement, but there does 
not seem to be a simple & straightforward solution around (read - 
straight-python syntax, one .py file installation, friendly license).



More information about the Python-list mailing list