summaryrefslogtreecommitdiff
path: root/launch.sh
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-11-02 20:06:16 +0100
committermathieui <mathieui@mathieui.net>2014-11-02 20:08:31 +0100
commitd98f2dde25daddffd1818a3032ed492067375936 (patch)
treed505f073c5e1914129115546024d2d83b29c3cba /launch.sh
parent5ef948270b12671daf066a6eec844e2f0c489a24 (diff)
downloadpoezio-d98f2dde25daddffd1818a3032ed492067375936.tar.gz
poezio-d98f2dde25daddffd1818a3032ed492067375936.tar.bz2
poezio-d98f2dde25daddffd1818a3032ed492067375936.tar.xz
poezio-d98f2dde25daddffd1818a3032ed492067375936.zip
Make update.sh install the deps in a venv, and use them
simplifies the script and avoid cluttering the poezio/ directory. also fix an unrelated test with slixmpp
Diffstat (limited to 'launch.sh')
-rwxr-xr-xlaunch.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/launch.sh b/launch.sh
index 72dcab7e..73b08eac 100755
--- a/launch.sh
+++ b/launch.sh
@@ -1,5 +1,6 @@
#!/bin/sh
poezio_dir=$(dirname "$0")
+VENV="poezio-venv"
if [ -d "$poezio_dir/.git" ]
then
@@ -7,5 +8,18 @@ then
else
args="0.8.3-dev"
fi
-exec python3 "$poezio_dir/src/poezio.py" -v "$args" "$@"
+
+if [ -e "$poezio_dir/$VENV" ]
+then
+ PYTHON3="$poezio_dir/$VENV/bin/python3"
+else
+ echo ""
+ echo "WARNING: Not using the up-to-date launch format"
+ echo "Run ./update.sh again to create a virtualenv with the deps"
+ echo "(or ignore this message if you don't want to)"
+ echo ""
+ PYTHON3=python3
+fi
+
+exec "$PYTHON3" "$poezio_dir/src/poezio.py" -v "$args" "$@"