Skip to content
/ venvy Public

A lightweight wrapper for the python 3.3+ venv utility

License

Notifications You must be signed in to change notification settings

nolanar/venvy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

venvy

A lightweight wrapper for the python 3.3+ venv utility

Setup

Run the venvy.sh script:

source /path/to/venvy.sh

This line should be added to your shell startup script (.bashrc, .profile etc.)

Virtual enviroment directory

If the VENV_HOME enviroment variable is defined as a directory then newely created virtual enviroments are created there. If not defined then newely created virtual enviroments are created in the working directory. Add:

export VENV_HOME=/path/to/venv_home

to you shell startup script (.bashrc, .profile etc.) if you wish to use a virtual enviroment home directory.

Commands

  • mkenv ENV_NAME :- create a new virtual enviroment
  • mkproj PROJ_NAME :- create a new virtual enviroment in $VENV_HOME and project in $PROJECT_HOME
  • startenv ENV_NAME :- activate a virtual enviroment stored in $VENV_HOME
  • stopenv :- deactivate the currently active virtual enviroment

Hooks

Hooks are used to run user defined scripts before or after commands. The following hooks can be configured in the $VENV_HOME/_HOOKS_ directory:

  • preactivate :- run before startenv
  • postactivate :- run after startenv
  • predeactivate :- run before stopenv
  • postdeactivate :- run after stopenv

Note: VENV_HOMEmust be defined to use hooks (see section on virtual enviroment directory above)

About

A lightweight wrapper for the python 3.3+ venv utility

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages