There is no way to do this as a single step, but it's easy to do as a two step process.
Use:
python bootstrap.py
./bin/buildout install cython
./bin/cpy bootstrap.py
./bin/cpy ./bin/buildout
The reason this is possible is because buildout supports an obscure option 'install' which no one ever talks about, but you can use it, like this:
[buildout]
parts = deps py # <---- Notice we don't depend on cython here
eggs =
whatever
kdist
nark
kivy # <--- But we do have a module that requires cython to build
develop =
.
lib/nark
lib/kivy-dist
[cython] # <---- By calling ./bin/buildout install cython we trigger this
recipe = zc.recipe.egg:script
parts = cython-py
interpreter = cpy # <--- Which makes our dummy ./bin/cpy
eggs =
cython
pyinstaller
[deps]
recipe = zc.recipe.egg:eggs
eggs = ${buildout:eggs}
[py]
recipe = zc.recipe.egg:script
interpreter = py
eggs = ${buildout:eggs}
The cute thing about this approach is that running buildout a second time clears out the bin directory so at the end of the day, you're left with a bin directory that looks like this:
$ ls bin/
buildout garden py
No leftover packages that may or may not hang around in your virtualenv and screw things up later. That why we're using buildout in the first place right?
...of course, if you want cython to hang around, juts stick it into the dependencies at the top as well.
PYTHONPATH
environment variable to include the dir where the Cython modules live? – Remsite-package
. Thanks to looking at my questions. – Tape/usr/local/lib/python2.X/site-packages
or in your homedir. In the latter case,PYTHONPATH
must be set properly. – Rem