Created
January 5, 2015 11:28
-
-
Save schettino72/9868c27526a6c5ea554c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
from doit.loader import create_after | |
@create_after(executed='early') | |
def task_build(): | |
for inf in glob.glob('*.in'): | |
yield { | |
'name': inf, | |
'actions': ['cp %(dependencies)s %(targets)s'], | |
'file_dep': [inf], | |
'targets': [inf[:-3] + '.out'], | |
'clean': True, | |
} | |
def task_early(): | |
"""a task that create some files...""" | |
inter_files = ('a.in', 'b.in', 'c.in') | |
return { | |
'actions': ['touch %(targets)s'], | |
'targets': inter_files, | |
'clean': True, | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment