Skip to main content

Minimalistic Python build tool inspired by Rake

Project description

It uses a simple python script (Cakefile) located in the project root to define its tasks. Cake can be run and can run tasks from anywhere within the project.

Features

  • Task descriptions
  • Task arguments
  • Colored output

Usage

List all tasks

cake

Execute task

cake [name] [args]

Example

$ cat Cakefile
import subprocess as sbp

from cake.lib import task, path, puts

@task("description override")
def test():
    """ task description """
    print('current dir: %s' % path.current)
    print('project dir: %s' % path.root)

@task
def shell(value):
    """ execute a custom shell command """
    puts('{magenta}>>{yellow} %s' % value)
    sbp.call(value, shell=True)
$ cake
(in /home/alex/work/cake/examples)
cake shell                                 # execute a custom shell command
cake test                                  # description override
$ cake shell "date"
(in /home/alex/work/cake/examples)
>> date
Thu Jul 21 20:15:37 EEST 2011

Install

pip install cake

Project details


Download files

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

Files for cake, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size cake-0.2.1.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page