Buildstrap: self contained env with ♥

For those who want to hack on any project without having to hack around your shell environment, mess with your python tools, pollute your home dotfiles, buildstrap is for you.

This project will bring the power of buildout, by generating in a simple command all you need to setup a buildout configuration, that will then create a self contained python environment for all your hacking needs.

It’s as simple as:

% git clone
% cd buildstrap
% buildstrap run buildstrap requirements.txt
% bin/buildstrap --version

What is being done here, is that you tell buildstrap the package’s name, and the requirements files to parse, and it will generate the the following buildout.cfg file:

newest = false
parts = buildstrap
develop = .
eggs-directory = ${buildout:directory}/var/eggs
develop-eggs-directory = ${buildout:directory}/var/develop-eggs
develop-dir = ${buildout:directory}/var/develop
parts-directory = ${buildout:directory}/var/parts
requirements = ${buildout:develop}/requirements.txt

eggs = ${buildout:requirements-eggs}
recipe = zc.recipe.egg

That file is then used to configure buildout so it creates the environment in your project’s directory. You’ll find all your dependencies downloaded into /var, and all the scripts you need populated in /bin.

So, it’s only two directories to add to your .gitignore, and to delete when you want to make your workspace clean again. Then you can choose to either keep (and eventually tweak) your buildout.cfg file, or throw it away.

Yes, it’s as easy as it sounds!