Compiling software was an old sysadmin part of the work that has been completly forgotten due to the binaries linux distribution except for the Solaris sysadmin.

Sun comes with a "workaround" Coolstack, which was at the beginning a package of the most used software compiled and optimized for the Sun niagara processor (in T1000/T2000). Some others solutions are Blastwave, or new Opensolaris Image Packaging System (IPS).

Coolstack is now a suite of software compiled and packaged with a kind of support by Sun, shipped for x86/amd64 and Sparc.

It includes Mysql, Apache, Python, ruby and mod_python... here is how to enable mod_python on a Solaris 10 T2000, yes to do some Django there !

It means you already have runtimes CSKruntime_1.3.1_sparc.pkg.bz2, CSKamp_1.3.1_sparc.pkg.bz2, CSKlibsbundle_1.3.1_sparc.pkg.bz2 installed.

Download and install CSKpython_1.3.1_sparc.pkg.bz2

bunzip2 CSKpython_1.3.1_sparc.pkg.bz2
pkgadd -d CSKpython_1.3.1_sparc.pkg.bz2

in fact this python AND mod_python, that you will find in /opt/coolstack/apache2/modules/mod_python.so after installation.

vi /opt/coolstack/apache2/conf/httpd.conf

add LoadModule python_module modules/mod_python.so

and

<Location /mpinfo>
       SetHandler mod_python
       PythonHandler mod_python.testhandler
</Location>

 /opt/coolstack/apache2/bin/apachectl restart

Point your browser to http://yourapache/mpinfo you should see some infos about your mod_python install.
Also try to read  /opt/coolstack/apache2/logs/error_log

You should see : [Thu Nov 06 17:31:26 2008] [notice] Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7d DAV/2 PHP/5.2.6 mod_python/3.3.1 Python/2.5.2 configured -- resuming normal operations
And some entries if there is a problem.

Edit your httpd.conf again remove the /mpinfo lines and start play with mod_python

Here is an example config for Django, that you can put in your vhost config.

    <Location "/">
        SetHandler python-program
        PythonHandler django.core.handlers.modpython
        SetEnv DJANGO_SETTINGS_MODULE blogakh.settings
        PythonDebug Off
        PythonPath "['/opt/data/web/kdl.nobugware.com/code/djangotrunk','/opt/data/web/kdl.nobugware.com/code' ] + sys.path
        PythonInterpreter blogakh_prod
    </Location>

    <Location "/media">
        SetHandler None
    </Location>