1
0
Fork 0
mirror of https://github.com/hcartiaux/dotfiles.git synced 2024-10-18 17:25:23 +02:00
dotfiles/direnv/envrc

22 lines
886 B
Text
Raw Normal View History

# -*- mode: sh; -*-
# (rootdir)/.envrc : local direnv configuration file
2020-05-13 18:04:15 +02:00
# Assumes the presence of '~/.config/direnv/direnvrc' from
# https://github.com/Falkor/dotfiles/blob/master/direnv/direnvrc
#
# Grab the latest version of this file from
# https://github.com/Falkor/dotfiles/blob/master/direnv/envrc
2020-05-13 18:04:15 +02:00
#
# Quick installation of this file for your project:
# cd /path/to/projectdir
# curl -o .envrc https://raw.githubusercontent.com/Falkor/dotfiles/master/direnv/envrc
# Default python version and virtualenv (basename of the root project directory)
[ -f ".python-version" ] && pyversion=$(head .python-version) || pyversion=3.7.4
[ -f ".python-virtualenv" ] && pvenv=$(head .python-virtualenv) || pvenv=$(basename $PWD)
use python ${pyversion}
# Create the virtualenv if not yet done
layout virtualenv ${pyversion} ${pvenv}
# activate it
2020-05-13 18:04:15 +02:00
layout activate ${pvenv}