Index: hooks/install |
=== modified file 'hooks/install' |
--- hooks/install 2013-10-07 14:45:00 +0000 |
+++ hooks/install 2013-11-13 18:37:07 +0000 |
@@ -20,10 +20,6 @@ |
import errno |
import os |
-from charmhelpers import ( |
- get_config, |
- log, |
-) |
from shelltoolbox import ( |
apt_get_install, |
run, |
@@ -32,13 +28,21 @@ |
# Python dependencies must be installed here so that the charm can import and |
# use required libraries. |
-PYTHON_DEPENDENCIES = ('python-apt', 'python-launchpadlib', 'python-tempita') |
+PYTHON_DEPENDENCIES = ( |
+ 'python-apt', 'python-launchpadlib', 'python-tempita', 'python-yaml') |
-log('Installing base Python dependnecies: {}.'.format( |
+run('juju-log', '--', 'Installing base Python dependencies: {}.'.format( |
', '.join(PYTHON_DEPENDENCIES))) |
apt_get_install(*PYTHON_DEPENDENCIES) |
+# The charmhelpers module depends on python-yaml and must be imported only |
+# after the installation of the Python dependencies above. |
+from charmhelpers import ( |
+ get_config, |
+ log, |
+) |
+ |
from utils import ( |
config_json, |
log_hook, |