From e282eced4445b79d3e0a7bd86f8b156fe672eb60 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Tue, 22 Dec 2020 01:09:59 -0500 Subject: Add support for pyenv. --- .envrc | 4 ++++ .python-version | 1 + README.md | 8 +++++++- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .python-version diff --git a/.envrc b/.envrc index 94840b3..1caca09 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,5 @@ +if has pyenv; then + pyenv install --skip-existing +fi + layout python3 diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..a5c4c76 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.9.0 diff --git a/README.md b/README.md index 7c9de09..3296195 100644 --- a/README.md +++ b/README.md @@ -39,4 +39,10 @@ Some familiarity with Python is assumed, here: ## 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. +I use [pyenv] and [`direnv`] to manage development. The configuration in +`.envrc` will automatically create a virtual Python environment using Pyenv (if +possible) or your current Python version (otherwise), and load it, once the +configuration is allowed. See the `direnv` documentation and the included +`.envrc` script for details. + +[pyenv]: https://github.com/pyenv/pyenv -- cgit v1.2.3