From ecd0ca99c6c0fa4894a2c39df272a10e944b7ec5 Mon Sep 17 00:00:00 2001 From: Andrey Golovizin Date: Sat, 8 Feb 2020 12:30:08 +0100 Subject: [PATCH] Initialize venv in .envrc --- .envrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.envrc b/.envrc index 3f91c96..da18424 100644 --- a/.envrc +++ b/.envrc @@ -5,3 +5,11 @@ else # fall back to using direnv's builtin nix support use nix fi + +VIRTUAL_ENV="$PWD/venv" +if [ ! -e venv ] +then + python -m venv --system-site-packages --without-pip "${VIRTUAL_ENV}" +fi +export VIRTUAL_ENV +PATH_add "$VIRTUAL_ENV/bin"