[Distutils] zc.buildout usage in the real world

Chris Withers chris at simplistix.co.uk
Thu Nov 26 23:36:55 CET 2009

Alex Rades wrote:
> The approach I've used so far has been setting up a private
> pypi-compatible repository, and recreate packages which fit my needs.
> But it really feels like killing an ant with a sledgehammer. I don't
> understand if there is a better way to:
> - Patch packages before installing
> - Fetch packages via git/svn/hg or via direct http link

What I do is check out the offending package, tweak the version in their 
setup.py to include the identifier of the revision I checked out, then 
do "python setup.py sdist" and put that sdist into my "egg server".

If I needed to apply patches that the packager won't accept (hasn't 
happened yet!), I'd do an export of the upstream package into my source 
control system, apply the patches and then do the process I've already 

My "egg server" is just an authentication-required folder on an https 
web server, I use lovely.buildouthttp and a find-links to make this work.

This is actually even quicker and simpler than it looks.

> [complex-deps]
> interpreter = python
> recipe = minitage.recipe.scripts
> urls =
>   http://media.djangoproject.com/releases/1.1.1/Django-1.1.1.tar.gz
>   http://github.com/robhudson/django-debug-toolbar/commit/f36b72655349cf3b8e9105bed3be5cd065162476
> Django-1.1.1-patches = ${buildout:directory}/patches/django-admin-fixes.diff
> debug_toolbar-patches =
> ${buildout:directory}/patches/debug_toolbar_sqlpanel.diff

This kind of patching makes me nervous...

> Which is very very handy, it handles all my use case in a compact and
> nice way. The minitage.recipe.scripts is nice but is not widely used,

...but then minitage as a whole makes me nervous, I just don't trust it, 
but I'm afraid I couldn't tell you why. Gut feeling...


Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk

More information about the Distutils-SIG mailing list