The intro predated the 2026-10-02 audit and did not mention the newly added poethepoet. Co-Authored-By: Claude <noreply@anthropic.com>
2.2 KiB
Tasks like running your tests go in pyproject.toml for Poe the Poet to run. C and C++ projects that replace Make with a Python build tool pick SCons.
How to choose:
- Project tasks in pyproject.toml, run in your uv or Poetry environment: Poe the Poet
- Compiling C or C++ in place of Make: SCons
- Tasks written as Python functions that run shell commands: Invoke
- Steps that skip when their input files haven't changed: doit
Poe the Poet reads tasks from a [tool.poe.tasks] table in pyproject.toml. A string like test = "pytest" is a whole task, run as a command without a shell. In a uv or Poetry project, poe runs tasks in the project's virtualenv, so you don't type uv run or poetry run in front.
Invoke tasks are Python functions in a tasks.py file, decorated with @task and taking a context as their first argument. Inside, c.run() runs a shell command. A function's arguments become CLI flags, and a task can name pre-tasks to always run before it.
doit reads tasks from a dodo.py file, where each task_ function returns a dict of actions, file dependencies, and targets instead of running anything. It saves a signature of each file_dep and skips a task whose inputs haven't changed. A task that declares no input never counts as up to date, so list the files each task reads in file_dep.
SCons reads your build from an SConstruct file, which is a Python script: Program('hello.c') there is enough for scons to compile a program. Calling a builder like Program() declares what you want built instead of building it on that line, and SCons works out when to run each step.