Personal tools
rt.ploneversions: an helper script to make your buildout safer

Pin Plone Wizard

Oct 03, 2013

rt.ploneversions: an helper script to make your buildout safer

In this article I show an easy way to modify your Plone buildouts in order to avoid dependencies from external resources. This can save your day: check it out!

It is a common practice, for Plone buildouts, to extend online configuration files that declare known good working versions for your eggs. Those external resources can, in turn, extend other remote resources.

This can be a big problem! Your buildout relies on the assumption that all those external resources are available: if they are not, it will simply fail!

This already happened, but luckily there are workarounds to solve this issue:

There can be other cases in which you may not want to include network resources, e.g. because your customer network policies will not easily allow you to fetch them.

Another (minor) issue, related to this approach, is that you have to wait for the resources to be fetched before starting.

Given that I don't want to cross my finger and wait for those resources to be retrieved on the net, I started including all the externals known good working versions in a file.

It is tedious to do it by hand, because you have to fetch and merge some files in the correct order, so I wrote the rt.ploneversions script.

It is really simple to use it: just install it with pip (or easy_install):

pip install rt.ploneversions

This will give you an executable called ploneversions.

Its usage is straightforward, just launch it passing as a parameter a version of Plone (check them out here). Here you have an example output (with some ellipses):

$ ploneversions 4.3-latest
## = 3.5.10
zope.rdb = 3.5.0

zope.annotation = 3.5.0
zope.kgs = 1.2.0

Zope2 = 2.13.21
zope.testbrowser = 3.11.1

docutils = 0.9.1
zc.relation = 1.0

You may want to redirect this output to a file, e.g.:

$ ploneversions 4.3-latest > versions.cfg

and add this file to your buildout (do not forget to add a [versions] section marker at the top of the file).

Happy and safe buildouting to everybody :)

P.s.: Thanks to Rob Boudon for the beautiful "Pinball wizard of Oz"!

comments powered by Disqus