]> arthur.barton.de Git - ax-zsh.git/commitdiff
New "python" plugin
authorAlexander Barton <alex@barton.de>
Sun, 12 May 2019 21:53:53 +0000 (23:53 +0200)
committerAlexander Barton <alex@barton.de>
Sun, 12 May 2019 21:53:53 +0000 (23:53 +0200)
plugins/python/README.md [new file with mode: 0644]
plugins/python/python.zprofile [new file with mode: 0644]
plugins/virtualenvwrapper/README.md
plugins/virtualenvwrapper/virtualenvwrapper.zshrc

diff --git a/plugins/python/README.md b/plugins/python/README.md
new file mode 100644 (file)
index 0000000..0cbe5ba
--- /dev/null
@@ -0,0 +1,7 @@
+## python
+
+Setup Python environment.
+
+### Environment
+
+- `$PIP_REQUIRE_VIRTUALENV`
diff --git a/plugins/python/python.zprofile b/plugins/python/python.zprofile
new file mode 100644 (file)
index 0000000..5ec3fac
--- /dev/null
@@ -0,0 +1,8 @@
+# AX-ZSH: Alex' Modular ZSH Configuration
+# python: Initialize Python environment
+
+# Make sure that python(1) or python3(1) is installed
+(( $+commands[python] )) || (( $+commands[python3] )) || return
+
+# pip: require a virtual environment, don't install in the global scope!
+export PIP_REQUIRE_VIRTUALENV="true"
index 66012d6429814ddba1e1d2584d04eb34ccf49688..269cbc509c58352446b8453b7004d29c68f486ba 100644 (file)
@@ -4,6 +4,5 @@ Look for and setup the Python *virtualenvwrapper*.
 
 ### Environment
 
-- `$PIP_REQUIRE_VIRTUALENV`
 - `$PROJECT_HOME`
 - `$WORKON_HOME`
index 260f890936a7271515e8c056cd7a8070d3be240b..59d6b57b12ad3d6679ca9d8115b18d00f05df925 100644 (file)
@@ -18,10 +18,6 @@ for script (
 
                source "$script"
                unset script
-
-               # pip
-               export PIP_REQUIRE_VIRTUALENV="true"
-
                break
        fi
 done