def install():
    """
    Installs the base system and Python requirements for the entire server.
    """
    # Install system requirements
    sudo("apt-get update -y -q")
    apt("nginx libjpeg-dev python-dev python-setuptools git-core "
        "postgresql libpq-dev memcached supervisor python-pip")
    run("mkdir -p /home/%s/logs" % env.user)

    # Install Python requirements
    sudo("pip install -U pip virtualenv virtualenvwrapper mercurial")

    # Set up virtualenv
    run("mkdir -p %s" % env.venv_home)
    run("echo 'export WORKON_HOME=%s' >> /home/%s/.bashrc" % (env.venv_home,
                                                              env.user))
    run("echo 'source /usr/local/bin/virtualenvwrapper.sh' >> "
        "/home/%s/.bashrc" % env.user)
    print(green("Successfully set up git, mercurial, pip, virtualenv, "
                "supervisor, memcached.", bold=True))
def install ( ) : sudo ( "apt-get update -y -q" ) apt ( "nginx libjpeg-dev python-dev python-setuptools git-core " "postgresql libpq-dev memcached supervisor python-pip" ) run ( "mkdir -p /home/%s/logs" % env . user ) sudo ( "pip install -U pip virtualenv virtualenvwrapper mercurial" ) run ( "mkdir -p %s" % env . venv_home ) run ( "echo 'export WORKON_HOME=%s' >> /home/%s/.bashrc" % ( env . venv_home , env . user ) ) run ( "echo 'source /usr/local/bin/virtualenvwrapper.sh' >> " "/home/%s/.bashrc" % env . user ) print ( green ( "Successfully set up git, mercurial, pip, virtualenv, " "supervisor, memcached." , bold = True ) )
Installs the base system and Python requirements for the entire server.