Revision 5 as of 2007-01-24 11:22:32

Clear message

Welcome to Pyramid

Pyramid is a simple, file based website templating system. Pyramid uses Nevow as its templating system and YAML as the format for its file based data.

At the moment, Pyramid is closely tied with the python.org redesign project and is being used to build the site at http://www.python.org. See PythonWebsitePyramidUsersGuide for more information.

Pyramid has been tested on Debian, Ubuntu and Windows XP.

Obtaining Pyramid

To check out and install pyramid:

svn co svn://pollenation.net/pyramid/trunk pyramid-trunk
cd pyramid-trunk
python setup.py build
sudo python setup.py install

Requirements

Pyramid requires Python 2.4.

Pyramid also requires the following modules.

Important: Use the links at the bottom of this document to obtain the correct versions of the required packages:

To install the Python packages (all but syck), do this:

python setup.py build
sudo python setup.py install

To install syck, use the usual configure/make/install:

./configure
make
sudo make install

Using Eggs

See PythonWebsitePyramidEggs for information on installing from eggs (tho I don't know if this is up to date).

Windows Users

Should be able to get away with Twisted Sumo windows installer http://twistedmatrix.com/projects/core/ (which includes zope interfaces as well as twisted and twisted web) and PySyck windows installer from xitology (which includes syck windows build)

Testing

XXX: Apparently, the exportpathCHANGEME.sh script is no longer used?

Once everything is installed, update the exportpathCHANGEME.sh script to point to your install location and try from the top pyramid subversion source directory:

python pyramid/test/tests.py

XXX: Three tests are failing right now. I do know xmldiff is being used right now, but I don't know the accuracy of the rest.

This should pass nicely. (actually it may not as different installations spit out html attributes in different orders.. The unittests are being changed to perform xmldiff's to get around this - in the mean time as long as the diff that you see when you run the script looks very similar you should be ok). Note.. this is really a regression test rather than a unit test. The second test will probable show differences depending on what version of docutils that you are using.

Usage

For python.org-specific instructions, take a look at http://www.python.org/dev/pydotorg/website/.

If you have installed pyramid you should be able to use build.py as follows:

python <PATHTOPYRAMID>/pyramid/build.py -d testdata -o testout -v -R<rebuilddirs>

Be warned that the testout folder is emptied before being used. It won't delete any folders with .svn files in them. It will create the output folder if it doesn't already exist.

The basic instantwebserver works ok but needs fixing as it doesn't add a slash at the end of urls (anyone know how to do this?). When using instantwebserver, point your browser to http://localhost:8000/

Beginner's documentation is at:

https://svn.python.org/www/trunk/beta.python.org/resources/docs/readme.rst

The documentation has some python.org specific stuff in it but that is a good thing at the moment.

Debugging in Wing IDE

To debug pyramid in Wing IDE, set up a project, add pyramid (or a copy of it) as the "main debug file" and set the parameters and starting directory in the File Properties (right click on file or file's name in project view). This can help point at problems when running w/ -V doesn't provide enough info.

XXX: Are these *specific* versions required, or are more recent versions OK? The Twisted Sumo distribution includes Twisted Core 2.2.0. The Do

Unable to edit the page? See the FrontPage for instructions.