-
Notifications
You must be signed in to change notification settings - Fork 77
/
.envrc.use_venv
22 lines (21 loc) · 1.03 KB
/
.envrc.use_venv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# ===========================================================================
# PROJECT ENVIRONMENT SETUP: .envrc.use_venv
# ===========================================================================
# REQUIRES: direnv >= 2.21.0 -- NEEDED FOR: venv support
# DESCRIPTION:
# Setup and use a Python virtual environment (venv).
# On entering the directory: Creates and activates a venv for a python version.
# On leaving the directory: Deactivates the venv (virtual environment).
#
# ENABLE/DISABLE THIS OPTIONAL PART:
# * TO ENABLE: Rename ".envrc.use_venv.disabled" to ".envrc.use_venv"
# * TO DISABLE: Rename ".envrc.use_venv" to ".envrc.use_venv.disabled"
#
# SEE ALSO:
# * https://direnv.net/
# * https://github.com/direnv/direnv/wiki/Python
# * https://direnv.net/man/direnv-stdlib.1.html#codelayout-python-ltpythonexegtcode
# ===========================================================================
# -- VIRTUAL ENVIRONMENT SUPPORT: layout python python3
# VENV LOCATION: .direnv/python-$(PYTHON_VERSION)
layout python python3