Permalink
Browse files

Auto venv loading

  • Loading branch information...
1 parent 031b6a7 commit 8b1c1184429f4ef709b3f7ae6e4746336891560a @noway421 noway421 committed Apr 13, 2015
Showing with 18 additions and 0 deletions.
  1. +6 −0 build.sh
  2. +6 −0 build_all.sh
  3. +6 −0 run_server.sh
View
@@ -1,5 +1,11 @@
#!/bin/sh
+cd "$(dirname "$(readlink -f "$(command -v "$0")")")"
+if [ -d "venv/" ] && [ ! "x$(command -v python)" == "x$VIRTUAL_ENV/bin/python" ]; then
+ source ./venv/bin/activate
+ echo "Using virtualenv"
+fi
+
python2 build.py build_ext --inplace
cd enet
python2 setup.py build_ext --inplace
View
@@ -1,5 +1,11 @@
#!/bin/sh
+cd "$(dirname "$(readlink -f "$(command -v "$0")")")"
+if [ -d "venv/" ] && [ ! "x$(command -v python)" == "x$VIRTUAL_ENV/bin/python" ]; then
+ source ./venv/bin/activate
+ echo "Using virtualenv"
+fi
+
# any compiled file whatsoever
find . -type f \( \
View
@@ -1,4 +1,10 @@
#!/bin/sh
+cd "$(dirname "$(readlink -f "$(command -v "$0")")")"
+if [ -d "venv/" ] && [ ! "x$(command -v python)" == "x$VIRTUAL_ENV/bin/python" ]; then
+ source ./venv/bin/activate
+ echo "Using virtualenv"
+fi
+
cd feature_server
exec python2 run.py "$@"

0 comments on commit 8b1c118

Please sign in to comment.