Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • slapos slapos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slaposslapos
  • Merge requests
  • !1135

Merged
Created Mar 07, 2022 by Thomas Leymonerie@tleymoneContributor

Create macros.cfg file to generate a virtual environment

  • Overview 49
  • Commits 2
  • Changes 2

This merge request replaces https://lab.nexedi.com/nexedi/slapos.recipe.build/merge_requests/15.

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.

Edited Mar 25, 2022 by Xavier Thompson
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: macro_recipe_build
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7