Extract `build_dir` to attribute