
To install Quixote, three steps are required. 
1) Install the compiler code from the Python CVS tree.
2) Edit config.py in the Quixote distribution directory, and then 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
============================

In 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 code works fine with Python 1.5.2, but it's only
available by checking a copy out of the current CVS tree.
To check out the compiler, run the following two CVS commands:

cvs -d:pserver:anonymous@cvs.python.sourceforge.net:/cvsroot/python login 
                   
The previous command will prompt you for a password; simply hit the
Enter key.

cvs -z3 -d:pserver:anonymous@cvs.python.sourceforge.net:/cvsroot/python \
   co -d compiler python/dist/src/Tools/compiler/compiler

This will check out just the compiler code, putting it in the
compiler/ subdirectory of your current working directory.  Copy
compiler/ to somewhere on your PYTHONPATH; the site-packages directory
is recommended.

Configuring the quixote package
===============================

Edit config.py to your taste.  In config.py you can specify
if tracebacks should be e-mailed, and to which e-mail address, whether
to reload Python code automatically, and various other settings; see
the comments in config.py for the details.

The most important configuration setting is ROOT_PACKAGE, the name of
the root package that will contain the Web-related code and template
files.


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 almost mandatory for production use since Quixote
is currently impractically slow when running using regular CGI
invocation.  (We hope to fix this eventually, but FastCGI works well,
so we're in no hurry.)

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
================



