Create macros.cfg file to generate a virtual environment
This merge request replaces slapos.recipe.build!15 (closed).
Rather creating a recipe or extending zc.recipe.egg, I created a macro with slapos.recipe.build
as suggested by Julien.
I've put in component/macros.cfg
so it can be reused.
You can use it like this :
[buildout]
extends =
../../component/macros.cfg
[django-tutorial]
<= macro-virtual-env
location = ${buildout:directory}/activate
eggs = Django
This will create a script activate
in the buildout bin directory. After that, all you have to do is source the script and you will have a virtual environment with Django. The script only works in POSIX and bash-like shell.
The virtual environment can be deactivated by calling deactivate
.