diff --git a/rattail/fablib/apache.py b/rattail/fablib/apache.py index 656fab085604f3d31eea61ff78aa700109098882..a1d1c66a360f69b00acdfb11858e2d6a8e3420db 100644 --- a/rattail/fablib/apache.py +++ b/rattail/fablib/apache.py @@ -51,11 +51,14 @@ def get_version(): return float(match.group(1)) -def install_wsgi(python_home=None): +def install_wsgi(python_home=None, python3=False): """ Install the mod_wsgi Apache module, with optional ``WSGIPythonHome`` value. """ - apt.install('libapache2-mod-wsgi') + if python3: + apt.install('libapache2-mod-wsgi-py3') + else: + apt.install('libapache2-mod-wsgi') if python_home: if get_version() == 2.2: sudo('echo WSGIPythonHome {} > /etc/apache2/conf.d/wsgi'.format(python_home))