Mikko Ohtamaa
Mikko Ohtamaa

Reputation: 83378

Buildout and creating virtualenv under different Python versions

I am looking options to integrate Python 3 tools / scripts to Plone's buildout.cfg (which targets Python 2.6). How eggs between different buildout recipes are shared? Because namely, running setup.py for Python 3 eggs would cause syntax errors in Python 2 environment.

Upvotes: 1

Views: 566

Answers (1)

Martijn Pieters
Martijn Pieters

Reputation: 1122102

You can specify the executable to be used by many recipes, including zc.recipe.egg:

[python3.3]
executable = /usr/local/bin/python3.3

[py3script]
recipe = zc.recipe.egg:scripts
python = python3.3
eggs = py3script

That should install the py3script scripts with python 3.3. The key here is the python key, which points to a section that should have a executable option, which is a path to the python executable you want to use.

The executable key is then used by the easy_install module internal to zc.buildout to run the setup.py script and install the egg.

Upvotes: 2

Related Questions