summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2020-12-22 01:09:59 -0500
committerOwen Jacobson <owen@grimoire.ca>2020-12-22 01:09:59 -0500
commite282eced4445b79d3e0a7bd86f8b156fe672eb60 (patch)
tree68405397c19cb938c44b6fa28ad380ca9ebb913f
parent19dc9eebd45efc01c14eec6b15fe2fb285f058b7 (diff)
Add support for pyenv.
-rw-r--r--.envrc4
-rw-r--r--.python-version1
-rw-r--r--README.md8
3 files changed, 12 insertions, 1 deletions
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