Hi Jim. I like this idea. I then makes it trivial to identify impacts of using different pythons on your application also since you can just change a single line in your buildout. For example, below, just change the ${python24:location}/bin/python to whatever python you want to evaluate another python including pointing to your system python if you wish.


recipe = zc.recipe:cmmi
url = http://python.org/ftp/python/2.4.4/Python-2.4.4.tgz
... more stuff

recipe = zc.recipe:cmmi
url = http://python.org/ftp/python/2.5.1/Python-2.5.1.tgz
... more stuff

executable = ${python24:location}/bin/python

recipe = zc.recipe.egg
interpreter = interpreter
eggs = zc.buildout
python = active-python

Jim Fulton wrote:

On Dec 20, 2007, at 8:58 PM, David Pratt wrote:

Right. Thanks for this, there are couple of solutions here and shell script is a reasonable solution but these methods seems counter to the simplicity of buildout. I had also seen a rebootstrap package in svn. I wonder if something similar could not be accomplished this way using python with a means of producing a callback. I really don't want anything too messy to accomplish this. Many thanks.

I'll note that much of the pain here (or at least in the distutils-sig thread) arises from the fact that the system Python and the custom Python have the same version but are built in incompatible ways. :( Unfortunately, binary egg names don't capture enough information about the ways the eggs were built.

I'm pondering an option to provide different egg directories for different Python interpreters. So, maybe something like:

  parts = python24 ...

  recipe = zc.recipe.cmmi
  url = ...
  executable = ${buildout:parts-directory}/bin/python
  eggs-directory = ${buildout:directory}/eggs
  develop-eggs-directory = ${buildout:parts-directory}/develop-eggs

The idea is that egg-aware recipes would use the egg locations specified in the Python section. I think this would provide a fairly clean way to build and use a custom Python.

Of course, it would be nice to have a recipe to build python that set the various variables.

I can see the benefit of building a custom Python as part of the buildout when you don't want users of a buildout to build a clean Python of their own. However, if you can require your users to do this, for example, if you are your user, then life is much simpler when a clean Python is managed separately.


Jim Fulton
Zope Corporation

Zope3-users mailing list

Reply via email to