构建系统
build.p的Python项目详细描述
生成.py
py是一个用python编写的简单构建系统。
只需创建一个包含以下内容的build.py
:
#!/usr/bin/python3importbuildbuild.main(__name__)classConfig(build.Config):# Put your options here# Defaults:# Default taskdefault='build'# Languages to build (lang/<lang>.py)languages=[]# Default output directoryout='out'# Whether to preserve output paths (src/dir/file.py -> out/dir/file.py or out/file.py)preserve_paths=True# Enable builtin tasks (build etc.)builtins=True# Or remove the class above and put your options here
然后调用./build.py -h
用法:build.py [-h] [-f FILE] [-o OUT] [task] [args [args ...]]
位置参数:
Option | Description |
---|---|
^{ | The task that should be called |
^{ | The arguments for TASK |
可选参数:
Short | Long | Description |
---|---|---|
^{ | ^{ | Show this help message and exit |
^{ | ^{ | The build configuration |
^{ | ^{ | The output directory |