受rake启发的简约python构建工具
cake的Python项目详细描述
它使用位于项目根目录中的简单python脚本(cakefile)来定义其任务。 cake可以运行,并且可以从项目中的任何位置运行任务。
功能
- Task descriptions
- Task arguments
- Colored output
用法
列出所有任务
cake
执行任务
cake [name] [args]
示例
$ cat Cakefile from cake.lib import task, path @task("header information") def test(value='test'): """ task description """ print('current dir: %s' % path.current) print('project dir: %s' % path.root) print('running with value %s' % value)
$ cake (in /home/alex/work/cake/examples) cake test # task description
$ cake test example (in /home/alex/work/cake/examples) ** test: header information current dir: /home/alex/work/cake/examples project dir: /home/alex/work/cake/examples running with value example
安装
pip install cake