]> git.parisson.com Git - docker-django-scripts.git/commitdiff
add setup_lib_py2.sh for python2
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 17 May 2021 08:38:36 +0000 (10:38 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 17 May 2021 08:38:36 +0000 (10:38 +0200)
build/local/setup_lib_py2.sh [new file with mode: 0755]

diff --git a/build/local/setup_lib_py2.sh b/build/local/setup_lib_py2.sh
new file mode 100755 (executable)
index 0000000..c037a26
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# Exit when any command fails
+# We need to stop build if pip fails
+set -e
+
+for module in `ls /srv/lib/`; do
+       cd /srv/lib/$module
+       if [ -f 'requirements.txt' ]; then
+               pip install -r requirements.txt
+       elif [ -f 'setup.py' ]; then
+               pip install -e .
+       fi
+done