Changeset - 0ff8631f4dbc
[Not reviewed]
0 1 0
Lance Edgar (lance) - 7 years ago 2018-02-12 23:34:45
lance@edbob.org
Add some python3 awareness when installing mod_wsgi
1 file changed with 5 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rattail/fablib/apache.py
Show inline comments
 
@@ -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))
0 comments (0 inline, 0 general)