Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install modwsgideploy

How to install modwsgideploy

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install modwsgideploy
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.4.20dev Available View build log
Windows (64-bit)
0.4.20dev Available View build log
Mac OS X (10.5+)
0.4.20dev Available View build log
Linux (32-bit)
0.4.20dev Available View build log
Linux (64-bit)
0.4.20dev Available View build log
 
License
BSD
Lastest release
version 0.4.20dev on Jan 5th, 2011

Deployment using mod_wsgi and apache. Below instructions will tell you how to quickly deploy your turbogears2 app using mod_wsgi.

Install modwsgideploy

PYPI

You can install modwsgideploy from PyPi:

System Message: WARNING/2 (<string>, line 11)

Literal block expected; none found.

easy_install modwsgideploy

Done.

Source Install

You also have a choice of getting the source and installing it. You should use this in a virtual environment, for example:

System Message: WARNING/2 (<string>, line 21)

Literal block expected; none found.

virtalenv --no-site-packages BASELINE source BASELINE/bin/activate

Install [:Bazaar:] if its not already installed on your system:

System Message: WARNING/2 (<string>, line 26)

Literal block expected; none found.

easy_install bzr

Branch out the code. This will pull all the revision history. If you want just the recent one use checkout:

System Message: WARNING/2 (<string>, line 30)

Literal block expected; none found.

bzr branch https://code.launchpad.net/~szybalski/modwsgideploy/trunk/ modwsgideploy_code

Install it:

System Message: WARNING/2 (<string>, line 34)

Literal block expected; none found.

cd modwsgideploy_code/trunk python setup.py develop

Run modwsgi_deploy

Go into your python application project folder and type in:

System Message: WARNING/2 (<string>, line 42)

Literal block expected; none found.

paster modwsgi_deploy

Example

Here is a typical installation, from start to finish on Debian Linux. You might have to use you OS specific commands for installing apache.

The steps are: 1) Install apache and modwsgi 2) Setup virtual environment and install tg2 3) Create tg2 app 'myapp' 4) Install modwsgideploy and tweak wsgi settings to fit your needs or use default settings. 5) Check if everything is running properly.

In this case I will install apache using tools available from my Linux operating system:

System Message: WARNING/2 (<string>, line 59)

Literal block expected; none found.

aptitude install apache2 aptitude install libapache2-mod-wsgi virtualenv --no-site-packages BASELINE source BASELINE/bin/activate easy_install -i http://www.turbogears.org/2.0/downloads/current/index tg.devtools paster quickstart myapp

Install modwsgideploy:

System Message: WARNING/2 (<string>, line 68)

Literal block expected; none found.

easy_install modwsgideploy

Go into you app and run modwsgi_deploy command:

System Message: WARNING/2 (<string>, line 72)

Literal block expected; none found.

cd myapp paster modwsgi_deploy

You should see an apache folder like this inside 'myapp':

System Message: WARNING/2 (<string>, line 77)

Literal block expected; none found.

myapp |-- apache | |-- README.txt | |-- myapp | |-- myapp.wsgi | `-- test.wsgi

System Message: WARNING/2 (<string>, line 77); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (<string>, line 77); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (<string>, line 77); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (<string>, line 77); backlink

Inline substitution_reference start-string without end-string.

System Message: WARNING/2 (<string>, line 77); backlink

Inline interpreted text or phrase reference start-string without end-string.
  1. Read the README.txt
  2. myapp is a apache configuration file that you need to copy into your apache configuration folder after all the settings are set.
  3. myapp.wsgi is an modwsgi script that is called from myapp apache file
  4. test.wsgi is a test script that you can call to see if you modwsgi was properly installed and working.

Edit myapp file to change any paths and/or apache configurations. Then copy to apache folder.

On my operating system I copy this file to:

System Message: WARNING/2 (<string>, line 94)

Literal block expected; none found.

cp ./apache/myapp /etc/apache2/sites-available/

Enable the website. On my OS its:

System Message: WARNING/2 (<string>, line 98)

Literal block expected; none found.

a2ensite myapp /etc/init.d/apache restart

Done

Feedback

If you have a useful sample wsgi script or apache config that you would like to share, please sent it to Turbogears mailing list.

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.