Hi,
tried to search in docs and find out if it is possible with fabfile.py
to do some thing similar to Makefile targets/rules.
In Makefile I can do:
bin/buildout: buildout.cfg
python bootstrap.py
These lines checks if ``bin/buildout`` is older than ``buildout.cfg`` or
``bin/buildout`` doesn't exists at all, and then runs ``python
bootstrap.py`` which generates ``bin/buildout``.
Next time, if ``bin/buildout`` exists and is newer than ``buildout.cfg``
nothing will be done.
In fabfile.py I imagine this could be implemented like this:
from fabric.api import local, make
def buildout(target, sources):
local('python %s' % sources[0])
def main():
make('all', {
'all': (None, ['bin/buildout']),
'bin/buildout': (buildout, ['buildout.cfg'])
})
--
Mantas aka sirex
__o /\
_ \<,_ -- launchpad.net/~sirex -- /\/ \
___(_)/_(_)_____________________________/_/ \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_______________________________________________
Fab-user mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/fab-user