There are two ways of getting packages for zamboni. The first is to install everything using pip. We have our packages separated into three files:
You can get a development environment with
pip install -r requirements/dev.txt -r requirements/compiled.txt
The other method is to use the /vendor library of all packages and repositories. These are maintained by Hudson in the zamboni-lib repository.
Check out the vendor lib with
git clone --recursive git://github.com/jbalogh/zamboni-lib.git ./vendor
Once the zamboni-lib repo has been downloaded to /vendor, you only need to install the compiled packages. These can come from your system package manager or from
pip install -r requirements/compiled.txt
The vendor repo was seeded with
pip install --no-install --build=vendor/packages --src=vendor/src -I -r requirements/dev.txt
Then I added everything in /packages and set up submodules in /src (see below). We’ll be keeping this up to date through Hudson, but if you add new packages you should seed them yourself.
If we wanted to add a new dependency called cheeseballs to zamboni, you would add it to requirements/prod.txt or requirements/dev.txt and then do
pip install --no-install --build=vendor/packages --src=vendor/src -I cheeseballs
Then you need to update vendor/zamboni.pth. Python uses .pth files to dynamically add directories to sys.path (docs).
I created zamboni.pth with this:
find packages src -type d -depth 1 > zamboni.pth
html5lib and selenium are troublesome, so they need to be sourced with packages/html5lib/src and packages/selenium/src. Hopefully you won’t hit any snags like that.
for f in src/*
pushd $f >/dev/null && REPO=$(git config remote.origin.url) && popd > /dev/null && git submodule add $REPO $f
Holy readability batman!