Clearsilver

From DreamHost
Revision as of 14:04, 12 May 2010 by Javierrod (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
The instructions provided in this article or section require shell access unless otherwise stated.

You can use the PuTTY client on Windows, or SSH on UNIX and UNIX-like systems such as Linux or Mac OS X.
Your account must be configured for shell access in the Control Panel.
More information may be available on the article's talk page.

The instructions provided in this article or section are considered advanced.

You are expected to be knowledgeable in the UNIX shell.
Support for these instructions is not available from DreamHost tech support.
Server changes may cause this to break. Be prepared to troubleshoot this yourself if this happens.
We seriously aren't kidding about this.

Clearsilver is a template system for use in a quite a few languages.

  • Requires Environment Setup done first to install correctly.
  • Requires several modifications to get working.

Setup

Version 0.9.14

Shell Commands

wget http://www.clearsilver.net/downloads/clearsilver-0.9.14.tar.gz
tar zxf clearsilver-0.9.14.tar.gz
cd clearsilver-0.9.14

Fixes

From Trac FAQ:

sed -i "s@/usr/local/bin/python@/usr/bin/env python@g" scripts/document.py

Version 0.10.2

You have to set PYTHON_SITE to avoid errors writing to /usr/local/lib/python2.3/site-packages without proper permissions

Shell Commands

export PYTHON_SITE="~/packages/lib/python2.3/site-packages"
...then follow Version 0.10.3 instructions below

Version 0.10.3

The following instructions install ClearSilver for use with Python (specifically for use with Trac). ClearSilver will be installed in your HOME/packages directory (less clutter that way) and will piggy-back on the existing Dreamhost Python installation. Note that the previous 'sed' hack is no longer necessary in ClearSilver 0.10.3.

Shell Commands

cd
mkdir packages
cd packages
wget http://www.clearsilver.net/downloads/clearsilver-0.10.3.tar.gz
tar zxf clearsilver-0.10.3.tar.gz
cd clearsilver-0.10.3
./configure --with-python=/usr/bin/python --prefix=$HOME/packages \
--disable-ruby --disable-java --disable-apache --disable-csharp --disable-perl

Note: be sure you did the environment setup and modified your .bashrc!

Version 0.10.5 based on Unix account setup and a newer version of Python

This instructions are mostly in order to later install Trac, but the setup will be as generic as possible, so that you can use other bindings of Clearsilver, like Perl or Ruby rather than only Python.

Prerequisites

Download and configure Clearsilver

  • Type the following in your shell:
cd ${HOME}/soft
wget http://www.clearsilver.net/downloads/clearsilver-0.10.5.tar.gz
tar xvfz clearsilver-0.10.5.tar.gz
cd clearsilver-0.10.5
./configure --prefix=${RUN} --with-python=${RUN}/bin/python \
  --with-ruby=${RUN}/bin/ruby --disable-apache --disable-csharp

Alternatively, if you don't want to install Ruby, you can configure as follows:

cd ${HOME}/soft
wget http://www.clearsilver.net/downloads/clearsilver-0.10.5.tar.gz
tar xvfz clearsilver-0.10.5.tar.gz
cd clearsilver-0.10.5
./configure --prefix=${RUN} --with-python=${RUN}/bin/python \
  --disable-ruby --disable-apache --disable-csharp

Installing

Type the following after you have finished the rest of the instructions for the version.

make
make install

External Links

Trac FAQ: Installing ClearSilver.