From 5959c623204b221cd4efe413db1d0ae2f42d9108 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Mon, 21 Dec 2020 23:50:04 -0500 Subject: Add direnv support to streamline virtualenv management. --- .envrc | 1 + .gitignore | 4 ++++ README.md | 4 ++++ 3 files changed, 9 insertions(+) create mode 100644 .envrc diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..94840b3 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +layout python3 diff --git a/.gitignore b/.gitignore index a57e710..206e68b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# If you're using direnv, the .envrc file will generate .direnv automatically +# when loaded. +/.direnv/ + # Generated metadata created by `pip install`, `setup.py sdist`, and friends. # Will be reconstituted from setup.py as needed. *.egg-info diff --git a/README.md b/README.md index a3bcd77..7c9de09 100644 --- a/README.md +++ b/README.md @@ -36,3 +36,7 @@ Some familiarity with Python is assumed, here: * Make a virtual environment; * `$VIRTUALENV/bin/pip install git+https://github.com/ojacobson/envdir-helper/#egg=envdir-helper`; and * Add its `bin` directory to `PATH` by other means, or invoke it by full path. + +## Development + +I use [`direnv`] to manage development. The configuration in `.envrc` will automatically create a virtual Python environment using your current Python version, and load it, once the configuration is allowed. See the `direnv` documentation for details. -- cgit v1.2.3