Stop using python::virtualenv

The virtualenv v20 release broke the version parsing.

Change-Id: I61acd33ded961dc1a861f729f9c2486970304ce5
This commit is contained in:
Monty Taylor 2020-02-11 15:33:23 -06:00 committed by Ian Wienand
parent e66b8a82cd
commit 6a54303968
1 changed files with 16 additions and 18 deletions

View File

@ -20,16 +20,14 @@ class askbot::install (
}
class { 'python':
pip => true,
dev => true,
virtualenv => true,
pip => true,
dev => true,
}
python::virtualenv { '/usr/askbot-env':
ensure => present,
owner => 'root',
group => 'root',
timeout => 0,
exec { 'create_askbot_env':
command => 'virtualenv /usr/askbot-env',
path => '/usr/local/bin:/usr/bin:/bin',
creates => '/usr/askbot-env',
}
case $db_provider {
@ -42,7 +40,7 @@ class askbot::install (
ensure => '1.2.3',
pkgname => 'MySQL-python',
virtualenv => '/usr/askbot-env',
require => [ Package['libmysqlclient-dev'], Python::Virtualenv['/usr/askbot-env'] ],
require => [ Package['libmysqlclient-dev'], Exec['create_askbot_env'] ],
}
}
'pgsql': {
@ -54,7 +52,7 @@ class askbot::install (
ensure => '2.4.5',
pkgname => 'psycopg2',
virtualenv => '/usr/askbot-env',
require => [ Package['libpq-dev'], Python::Virtualenv['/usr/askbot-env'] ],
require => [ Package['libpq-dev'], Exec['create_askbot_env'] ],
}
}
default: {
@ -66,7 +64,7 @@ class askbot::install (
ensure => '0.2.1',
pkgname => 'captcha',
virtualenv => '/usr/askbot-env',
require => Python::Virtualenv['/usr/askbot-env'],
require => Exec['create_askbot_env'],
}
if $redis_enabled {
@ -78,14 +76,14 @@ class askbot::install (
ensure => '2.10.3',
pkgname => 'redis',
virtualenv => '/usr/askbot-env',
require => Python::Virtualenv['/usr/askbot-env'],
require => Exec['create_askbot_env'],
}
python::pip { 'django-redis-cache':
ensure => '1.3.0',
pkgname => 'django-redis-cache',
virtualenv => '/usr/askbot-env',
require => Python::Virtualenv['/usr/askbot-env'],
require => Exec['create_askbot_env'],
}
}
@ -94,14 +92,14 @@ class askbot::install (
ensure => '2.3.1',
pkgname => 'django-haystack',
virtualenv => '/usr/askbot-env',
require => Python::Virtualenv['/usr/askbot-env'],
require => Exec['create_askbot_env'],
}
python::pip { 'pysolr':
ensure => '3.3.0',
pkgname => 'pysolr',
virtualenv => '/usr/askbot-env',
require => Python::Virtualenv['/usr/askbot-env'],
require => Exec['create_askbot_env'],
}
}
@ -112,7 +110,7 @@ class askbot::install (
logoutput => on_failure,
subscribe => Git['askbot'],
refreshonly => true,
require => Python::Virtualenv['/usr/askbot-env'],
require => Exec['create_askbot_env'],
}
python::pip { 'stopforumspam':
@ -129,7 +127,7 @@ class askbot::install (
ensure => '1.10.0',
pkgname => 'six',
virtualenv => '/usr/askbot-env',
require => Python::Virtualenv['/usr/askbot-env'],
require => Exec['create_askbot_env'],
}
include httpd::mod::wsgi
@ -143,7 +141,7 @@ class askbot::install (
subscribe => Git['askbot'],
refreshonly => true,
require => [
Python::Virtualenv['/usr/askbot-env'],
Exec['create_askbot_env'],
Exec[ 'pip-requirements-install' ],
Python::Pip[ 'six' ],
Python::Pip[ 'stopforumspam' ],