File: delayed_creates.py

package info (click to toggle)
doit 0.36.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,704 kB
  • sloc: python: 11,863; makefile: 33; ansic: 14; javascript: 3; sh: 1
file content (18 lines) | stat: -rw-r--r-- 351 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import sys

from doit import create_after

def say_hello(your_name):
    sys.stderr.write("Hello from {}!\n".format(your_name))

def task_a():
    return {
        "actions": [ (say_hello, ["a"]) ]
    }

@create_after("a", creates=['b'])
def task_another_task():
    return {
        "basename": "b",
        "actions": [ (say_hello, ["b"]) ],
    }