Browse code

Merge "Install Glance into its own venv"

Jenkins authored on 2015/03/27 05:36:48
Showing 1 changed files
... ...
@@ -31,8 +31,16 @@ set +o xtrace
31 31
 # Set up default directories
32 32
 GITDIR["python-glanceclient"]=$DEST/python-glanceclient
33 33
 GITDIR["glance_store"]=$DEST/glance_store
34
-
35 34
 GLANCE_DIR=$DEST/glance
35
+
36
+# Glance virtual environment
37
+if [[ ${USE_VENV} = True ]]; then
38
+    PROJECT_VENV["glance"]=${GLANCE_DIR}.venv
39
+    GLANCE_BIN_DIR=${PROJECT_VENV["glance"]}/bin
40
+else
41
+    GLANCE_BIN_DIR=$(get_python_exec_prefix)
42
+fi
43
+
36 44
 GLANCE_CACHE_DIR=${GLANCE_CACHE_DIR:=$DATA_DIR/glance/cache}
37 45
 GLANCE_IMAGE_DIR=${GLANCE_IMAGE_DIR:=$DATA_DIR/glance/images}
38 46
 GLANCE_AUTH_CACHE_DIR=${GLANCE_AUTH_CACHE_DIR:-/var/cache/glance}
... ...
@@ -47,13 +55,6 @@ GLANCE_CACHE_CONF=$GLANCE_CONF_DIR/glance-cache.conf
47 47
 GLANCE_POLICY_JSON=$GLANCE_CONF_DIR/policy.json
48 48
 GLANCE_SCHEMA_JSON=$GLANCE_CONF_DIR/schema-image.json
49 49
 
50
-# Support entry points installation of console scripts
51
-if [[ -d $GLANCE_DIR/bin ]]; then
52
-    GLANCE_BIN_DIR=$GLANCE_DIR/bin
53
-else
54
-    GLANCE_BIN_DIR=$(get_python_exec_prefix)
55
-fi
56
-
57 50
 if is_ssl_enabled_service "glance" || is_service_enabled tls-proxy; then
58 51
     GLANCE_SERVICE_PROTOCOL="https"
59 52
 fi