# Bob Buildout¶

This package includes an extension and a recipe to make it easy to create local, directory-based complete development environments for Bob packages. While Bob packages are distributed as conda-based installable packages, the use of zc.buildout may greaty shorten development cycles as it avoids the conda-build step, which can be somewhat lengthy (e.g. for packages with C/C++ bindings).

zc.buildout, unlike conda, can not handle non-python-based packages. It is therefore a tool to quickly create deployments or test changes on python-based distributable packages. It follows that, in order to use zc.buildout, packages need to be python-based packages. Luckily, most of Bob packages fit in this category, besides also being conda packages, so zc.buildout can be used for development purposes in this context. Although zc.buildout supports deployment, it is currently not used for this purpose in the context of Bob. Our dependence list goes beyond Python-only packages (e.g. ffmpeg or blitz++) and a full-stack software deployment cannot be easily achieved relying only on this python development tool.

zc.buildout uses Python setuptools to create a directory structure that contains scripts and dependencies which can defined in a buildout recipe. Once a buildout recipe is interpreted, zc.buildout will make sure all listed dependencies are satisfied and automatically instantiate scripts with changed load paths that take in consideration all python packages. In order to satistfy dependencies, zc.buildout may download missing python-based packages from PyPI, the Python Package Index. In the context of Bob-based package development, we seldomly use this feature though.

Because zc.buildout is used for Bob package development since quite sometime, most packages in the Bob ecosystem include a file called buildout.cfg that can be used by zc.buildout to build a quick, throw-away development environment for the current package. A common misconception is that one must checkout a Bob package in order to run buildout. That is not true. zc.buildout is an independent development tool that just deployes a python-based software stack based on a recipe. If the recipe mentions the code of a package on the current directory, the setup will include this. If it doesn’t, then it won’t. We typically don’t use zc.buildout to create deployments for Bob packages - we normally defer this task to conda as it can handle non-pythonic dependencies in a much better and uniform way. That said, it is possible to create python-only based deployments using zc.buildout without being necessarily in the root directory of a Bob package.

This document explains how to use zc.buildout and bob.buildout’s recipe and extension to construct development environments for your Bob packages.