summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-12-05 09:58:49 -0400
committerKali Kaneko <kali@leap.se>2013-12-05 09:58:49 -0400
commit603153039279f9b47703fa02ad36971b3abd6dc4 (patch)
tree810b3bbee82c8c1b227983cd6e897bb4b6a2f51e
parentc6fa2cd9b34f2f850de8dd19b1c22b0e981090a8 (diff)
add with_venvwrapper script
-rwxr-xr-xpkg/tools/with_venvwrapper.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/tools/with_venvwrapper.sh b/pkg/tools/with_venvwrapper.sh
new file mode 100755
index 0000000..693c0ac
--- /dev/null
+++ b/pkg/tools/with_venvwrapper.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+#Wraps a command in a virtualenwrapper passed as first argument.
+#Example:
+#with_virtualenvwrapper.sh leap-bitmask ./run_tests.sh
+
+wd=`pwd`
+alias pyver='python -c "import $1;print $1.__path__[0]; print $1.__version__;"'
+
+source `which virtualenvwrapper.sh`
+echo "Activating virtualenv " $1
+echo "------------------------------------"
+workon $1
+cd $wd
+echo "running version: " `pyver leap.bitmask`
+$2 $3 $4 $5