]> arthur.barton.de Git - ConfigScripts.git/commitdiff
Setup environment for Python "pip", if installed
authorAlexander Barton <alex@barton.de>
Wed, 23 Apr 2014 18:24:29 +0000 (20:24 +0200)
committerAlexander Barton <alex@barton.de>
Wed, 23 Apr 2014 18:24:29 +0000 (20:24 +0200)
sys/profile

index a606169774bd8586d15c9ed400f1d010c376422c..15cee68c9434995a977006a726e42b38cc036f24 100644 (file)
@@ -105,6 +105,12 @@ fi
 [ -n "$HOSTNAME" ] || HOSTNAME=`hostname 2>/dev/null`
 export HOSTNAME
 
+# Setup environment for Python "pip", if installed
+if [ "$(type -t pip 2>/dev/null)" ]; then
+       export PIP_REQUIRE_VIRTUALENV=true
+       export PIP_DOWNLOAD_CACHE="$HOME/.cache/pip"
+fi
+
 # Move Xauthority file to local storage, so that sudo et all work
 if [ -z "$XAUTHORITY" -a -r ~/.Xauthority ]; then
        cp ~/.Xauthority /tmp/Xauthority-$LOGNAME