
To install Quixote, three steps are required. 
1) Install the compiler code from the Python 2.0 distribution.
2) Install the quixote.* Python package.  
3) Place the CGI script where it's executable by your Web server, and
   configure the Web server as required.


Installing the compiler code
============================

Starting with Quixote v0.02, the syntax of PTL was changed to be
essentially the same as Python's, with some semantic differences.
Python 2.0 contains a set of modules for parsing source code and
generating Python bytecode, and the PTL compiler is built on top of
it.

The compiler is available as part of the Python 2.0 distribution.
There are also versions of the compiler available that work with
1.5.2.  To install the compiler from the Python 2.0 distribution, run:

    cd Python-2.0/Tools/compiler
    python setup.py build install


Installing the quixote package
==============================

Quixote is packaged using the Distutils; if you're running Python
1.5.2, you'll need to install Distutils first, by downloading the code
from http://www.python.org/sigs/distutils-sig/ and following the
instructions.  If you're using Python 2.0, the Distutils are already
included.

Once the Distutils are available, simply run "python setup.py install".

The 'quixote' package and its subpackages will be copied into the
appropriate directory for site-specific packages.


Installing the CGI script
=========================

Copy quixote.cgi to the CGI directory for your Web server, and be sure
that it's executable.  Consult your Web server documentation to find
out how to set up a CGI directory.


Further server configuration
============================

quixote.cgi can use FastCGI for improved performance, by running a
single long-lived process instead of starting a new process on every
hit.  This step is highly recommended for production use, since it
saves the initial overhead of starting a Python process and importing
a bunch of modules.

Consult your Web server's documentation to find out if it supports
FastCGI.  If you're using Apache, you can compile it with mod_fastcgi
enabled, and then the following snippets can be added to your
httpd.conf file:

================
# FastCGI configuration directives for Quixote
FastCgiIpcDir /www/httpd/var
FastCgiServer /www/cgi-bin/quixote.fcgi -socket fcgi.sock 
AddHandler fastcgi-script .fcgi

Rename the quixote.cgi script to quixote.fcgi, so Apache can recognize
the different extension.  It's also possible to add a shorthand form
for accessing Quixote using mod_rewrite.  The following directive
makes http://hostname/q/x/y/z equivalent to
http://hostname/cgi-bin/quixote/x/y/z.

# Rewrite rule to make a shorthand for access to Quixote
RewriteRule ^/q/(/$|.*) /www/cgi-bin/quixote.fcgi$1 [t=fastcgi-script,l]
RewriteEngine on
================



