Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
slapos slapos
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • 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 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.

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