Skip to main content

Fix a couple of things with my venv and tmpdir scripts

ID
30d4bc7
date
2023-11-26 10:15:59+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
6058fef
message
Fix a couple of things with my venv and tmpdir scripts
changed files
2 files, 4 additions, 7 deletions

Changed files

fish_functions/tempdir.fish (108) → fish_functions/tmpdir.fish (108)

diff --git a/fish_functions/tempdir.fish b/fish_functions/tmpdir.fish
similarity index 100%
rename from fish_functions/tempdir.fish
rename to fish_functions/tmpdir.fish

fish_functions/venv.fish (494) → fish_functions/venv.fish (423)

diff --git a/fish_functions/venv.fish b/fish_functions/venv.fish
index 8a5c73e..5b2a978 100644
--- a/fish_functions/venv.fish
+++ b/fish_functions/venv.fish
@@ -3,16 +3,13 @@
 # This is to prevent me from making a very common mistake, which is
 # creating the venv and then immediately running "pip install" without
 # activating it first.
-#
-# I upgrade pip because otherwise I get warnings about it being
-# out-of-date, and that's annoying.
 function venv
-    python3 -m venv .venv
-    source .venv/bin/activate.fish
-
-    python3 -m pip install --upgrade pip
+    echo "Creating virtual environment in "(pwd)"/.venv"
+    python3 -m venv .venv --upgrade-deps
 
     if [ -f .git ]
         echo .venv >>.git/info/exclude
     end
+
+    source .venv/bin/activate.fish
 end