zinebuildout 0.5 : a buildout for Zine

Zine logo

This blog is powered by Zine, a blog engine written in Python (with Werkzeug, Jinja2 and SQLAlchemy) and I'm very satisfied with it. I first want to thank its main author, Armin Ronacher (mitsuhiko) and the contributors. It's development is not as fast as I initially expected, but it's mercurial repository shows a constant activity:

Zine activity

Yes I know, I should contribute... Until now, I did not find any time to do it, but this could change in a near future.

When I first installed it, I was surprised there is no distutils/setuptools setup.py file, just a classic 'configure && make' procedure. The authors probably want to avoid any Python-specific tasks during installation, so that it is more widely adopted. They also probably don't like setuptools (BTW, setuptools is being forked for real by Tarek). The same applies to the deployment: Zine is expected to be deployed with mod_wsgi, which promises to offer easy and shared Python hosting to the masses.

But I'm used to Python tools, I don't find that typing "sudo python setup.py install" or something similar is difficult, I like to deploy with PasteDeploy, and I like to work with Buildout. That's why I've packaged Zine in a setuptools-enabled buildout.

Below is the content of the README file for version 0.5 of the buildout. I've also added a Twitter widget, but this one should better go in Zine itself, or in an external plugin. You can see the result right here, on the right.

http://pypi.python.org/pypi/zinebuildout/

Installation

This package allows you to install Zine and its dependencies in a sandbox with buildout, then serve it with any WSGI server while using the Paste facilities for WSGI stack configuration.

Install Zine:

Download and extract the zinebuildout archive from PyPI, (or clone it with: hg clone https://cody.gorfou.fr/hg/zinebuildout ). You don't need to easy_install it. Then run:

$ python bootstrap.py
$ ./bin/buildout

Configure Zine:

Edit "deploy.ini" to adapt instance_folder, host and port to your needs. You don't need to change anything if you just want to try it on your local host.

Start Zine:

In foreground:

$ ./bin/paster serve deploy.ini

Or in background:

$ ./bin/paster serve --daemon deploy.ini

Optional Twitter widget

This distribution offers a Twitter widget that displays the N latests tweets of your timeline. To use it, just add the following line in the '_widgets.html' file of your Zine theme:

{{ widgets.tweets('ccomb', 5) }}

Replace 'ccomb' with your twitter account, and 5 with the number of tweets you want to display.