Skip to main content

task automation tool for Python, similar to Make, Rake, Ant, or Cook

Project description

pyKook is a very useful tool to control your task such as compile, install or clean. pyKook is similar to Make, Rake, Ant, or Cook., which is a task definition file for pyKook, is written in Python.

Simple Example of

def hello(c):

Output Result:

bash> kk hello     # or pykook hello
### * hello (recipe=hello)

Other Example of

CC = prop('CC', 'gcc -Wall')
kookbook.default = 'all'

@ingreds('hello')                      # ingredients
def all(c):                            # or task_all(c)

@recipe('*.o', ['$(1).c', '$(1).h'])   # @recipe(product, [ingredients])
def file_o(c):
    """compile *.c and *.h into *.o"""
    system(c%'$(CC) -c $(ingred)')

@recipe('hello', ['hello.o'])          # @recipe(product, [ingredients])
def file_hello(c):
    """create 'hello' command"""
    system(c%'$(CC) -o $(product) $(ingred)')

def clean(c):
    rm_rf("**/*.o", "**/*~")

## or
kookbook.load('@kook/books/')   # load 'clean' and 'sweep' recipes

See User’s Guide for details.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Kook-0.7.2.tar.gz (188.7 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page