Run pip install to install the dependencies

Id2e8590193fbf21a52a767323a77df9be4048b5a requires
gerrit-dash-creator to be installed on the host where
reviewday runs. This patch runs pip install to install
all the dependencies.

Change-Id: I42ea25bdf69a1d75db24785db0e86396206fd48d
This commit is contained in:
rossella 2016-04-04 19:25:58 +02:00
parent 5796e7f8bd
commit dee4cb5373
2 changed files with 9 additions and 8 deletions

View File

@ -15,14 +15,7 @@
# Class: reviewday
#
class reviewday {
if ! defined(Package['python-launchpadlib']) {
package { 'python-launchpadlib':
ensure => present,
}
}
package { 'python-cheetah':
ensure => present,
}
file {'/var/lib/reviewday':
ensure => directory,

View File

@ -82,6 +82,13 @@ define reviewday::site(
revision => 'master',
}
exec { 'install-reviewday-dependencies':
command => 'pip install -r requirements.txt',
path => '/var/lib/reviewday/reviewday',
subscribe => Vcsrepo['/var/lib/reviewday/reviewday'],
require => Class['pip'],
}
file { $httproot:
ensure => directory,
owner => 'reviewday',
@ -101,6 +108,7 @@ define reviewday::site(
command => "cd /var/lib/reviewday/reviewday && PYTHONPATH=\$PWD flock -n /var/lib/reviewday/update.lock python bin/reviewday -o ${httproot}",
minute => '*/30',
user => 'reviewday',
require => Exec['install-reviewday-dependencies'],
}
}