Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(408)

Unified Diff: hooks/install

Issue 26190043: Fix base Python dependencies.
Patch Set: Fix base Python dependencies. Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « hooks/backend.py ('k') | hooks/utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « hooks/backend.py ('k') | hooks/utils.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b