summaryrefslogtreecommitdiff
path: root/scripts/docker/files/build
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2016-06-10 22:07:35 -0300
committerdrebs <drebs@leap.se>2016-06-22 17:51:18 -0300
commit78d61dfaadf9bcac7258a33738c660b238b7bf27 (patch)
tree9cb2797e0cf0b09335be32d4f54b1e6d583a9558 /scripts/docker/files/build
parente14f17247ce03f1c49cab3c944039ff9aba84f64 (diff)
[test] refactor of docker scripts
Diffstat (limited to 'scripts/docker/files/build')
-rwxr-xr-xscripts/docker/files/build/install-deps-from-repos.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/docker/files/build/install-deps-from-repos.sh b/scripts/docker/files/build/install-deps-from-repos.sh
new file mode 100755
index 00000000..46530c86
--- /dev/null
+++ b/scripts/docker/files/build/install-deps-from-repos.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# Install dependencies needed to run client and server in a test environment.
+#
+# In details, this script does the following:
+#
+# - install dependencies for packages in /var/local from their requirements
+# files in each of the repositories, using python wheels when possible.
+#
+# - install the python packages in development mode
+#
+# This script is meant to be copied to the docker container during container
+# build and run after system dependencies have been installed.
+
+BASEDIR="/var/local"
+
+# install dependencies and packages
+install_script="pkg/pip_install_requirements.sh"
+opts="--use-leap-wheels"
+pkgs="leap_pycommon soledad/common soledad/client soledad/server"
+
+for pkg in ${pkgs}; do
+ pkgdir=${BASEDIR}/${pkg}
+ testing=""
+ if [ -f ${pkgdir}/pkg/requirements-testing.pip ]; then
+ testing="--testing"
+ fi
+ (cd ${pkgdir} && ${install_script} ${testing} ${opts})
+ (cd ${pkgdir} && python setup.py develop)
+done