[Distutils] Python svn builds

Jeff Rush jeff at taupro.com
Mon Jun 1 06:49:16 CEST 2009

A. Cavallo wrote:
> Hi all,
> I've just published few python rpms for the trunk source. You can download and 
> install the packages from (either by hand or using yum/yast):
> Module developer can use these build to test against the more up to date 
> python source and anticipating bugs.  Developer can use it to run
> regression/integration tests.

Thanks Antonio.  Having RPMs for the trunk is useful.

It is not well known but you can also build custom versions of Python using
zc.buildout, which can be run with the system version of Python but use a
different Python version inside for any or all of the parts.

My system Python is 2.5 but here is a buildout I use to test stuff with 2.4.

The magic is the python= assignment in the [buildout] section which sets
globally the executable to use for all parts which do not specify their onw
python= in their part definition.

The other magic is the executable= assignment in the part that creates an
instance of the Python interpreter.  It points to the actual executable binary.

Using this you can create one buildout with a handful of Python versions and
run your module test suites against all of them.

--- cut here ---
python = Python-2.4.3

parts =

recipe = zc.recipe.cmmi
url =
extra_options   =
  --prefix ${buildout:parts-directory}/python243
executable =

recipe = zc.recipe.egg:scripts
interpreter = python2.4
eggs =
extra-paths =

# example of setting up yet another prompt
recipe = zc.recipe.egg:scripts
interpreter = python2.6
python = Python-2.6.2
eggs =
extra-paths =
--- cut here ---

More information about the Distutils-SIG mailing list