How to run Byteflow blog engine on Jython

I’m already write some articles about problems in running Trac on Jython. Today i describe successfully installation of popular Django-based blog engine Byteflow on Jython.

Step 1: Install Java, Jython, Django

To setup Byteflow on Jython you must install JDK, and Jython compiler. I’m recommend to use Sun JDK version 1.6 and latest Jython from 2.5 branch (Now latest version of Jython is 2.5b0 and final 2.5 version will released soon).

Note: if you install Jython on computer without graphical interface you must run console version of installer: $java -jar jython_installer-2.5b0.jar --console

otherwise you get error:

java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it.

Note: After Jython installation you must set executable flag on jython binary: $chmod +x <path to Jython home>/bin/jython

After it you need to install Django. Django from version 1.0.0 work out of box with Jython, therefore you can get latest version of 1.0.x branch (Now latest version of Django is 1.0.2).

$wget http://www.djangoproject.com/download/1.0.2/tarball/ $tar xjvf Django-1.0.2-final.tar.gz $cd Django-1.0.2-final $jython setup.py install

Step 2: Install Byteflow requirements Byteflow depends on some libraries which not distributed with Jython, therefore you must download and install it manually.

Install database wrapper: Jython can’t use standard DBAPI-2.0 modules because they use low level C-implementation of driver, instead it use JDBC database drivers and zxjdbc wrapper.

You must download and install django-jython module which provide Django database wrappers for jdbc drivers: $svn co http://django-jython.googlecode.com/svn/trunk/ django-jython $cd django-jython $jython setup.py install

Currently it support only postgresql and sqlite3.but work on other databases (including mysql) in progress.

Also you must download appropriate jdbc driver, for Postgresql you must to download it from http://jdbc.postgresql.org/

Install BeautifulSoup: You must download and compile BeautifulSoup module for Jython: $wget http://www.crummy.com/software/BeautifulSoup/download/BeautifulSoup.tar.gz $tar xzvf BeautifulSoup.tar.gz $cd BeautifulSoup-3.0.7a $jython setup.py install

Install ElementTree: Byteflow use ElementTree ant you need to install in by standard way: $svn checkout http://jython-elementtree.googlecode.com/svn/trunk elementtree $cd elementtree $jython setup.py install --stdlib

Install OpenID: Download and install python-openid version2: $wget "http://openidenabled.com/files/python-openid/packages/python-openid-2.2.1.tar.bz2" $jar xzvf python-openid-2.2.1.tar.bz2 $cd python-openid-2.2.1 $jython setup.py install

Step 3: Download, configure and run Byteflow: You can download Byteflow from mercurial repository and follow simple installation guide: $hg clone http://hg.piranha.org.ua/byteflow/ $cd byteflow

After this you must change some configuration values in settings_local.py according of you preferences. You must change value in DATABASE_ENGINE field to use django-jython wrapper: DATABASE_ENGINE = 'doj.backends.zxjdbc.postgresql' # variants: mysql, sqlite3

Also you must change value of CAPTCHA variable — set recaptcha if you have account on recaptcha or disable captcha by specify empty value. You must do this because captcha module depends on PIL which is not ported to Jython.

Now you are ready to create Byteflow database. You need specify path to jdbc jar file in classpath because otherwise Jython can’t resolve this: $export JYTHON_HOME=<path to Jython home> $java -classpath $JYTHON_HOME/jython-complete.jar:<path to dowloaded jdbc jar>/postgresql-8.3-604.jdbc3.jar -Dpython.home="$JYTHON_HOME" org.python.util.jython manage.py syncdb

After this you can finally run Byteflow instance with django internal http server: $export JYTHON_HOME=<path to Jython home> $java -classpath $JYTHON_HOME/jython-complete.jar:<path to dowloaded jdbc jar>/postgresql-8.3-604.jdbc3.jar -Dpython.home="$JYTHON_HOME" org.python.util.jython manage.py runserver

Reference:
 Distributions:

Modules:

Articles:

Add post to:   Delicious Reddit Slashdot Digg Technorati Google
Make comment

Pingbacks

24.06.2011 9:28 Buy Adobe Software Online @adobebuy.com
purchase and download software Adobe Acrobat 9 Pro Extended buy oem soft. discount soft order management software software to purchase.
24.06.2011 8:17 Buy Adobe Software Online @adobebuy.com
sales order software software for purchase. Adobe InDesign CS4 purchase ledger software educational software purchase discount soft.
24.06.2011 6:27 Buy Adobe Software Online @adobebuy.com
sales order software order inventory software. Adobe InDesign CS4 buy software sales order processing software with software purchase.
24.06.2011 4:25 Buy Adobe Software Online @adobebuy.com
buy software purchase computer software. Adobe InDesign CS4 purchase order software buy software discounted software.
24.06.2011 2:29 Buy Adobe Software Online @adobebuy.com
order soft order process software. Adobe InDesign CS4 xp software purchase point of purchase software order management software.
24.06.2011 0:21 Buy Adobe Software Online @adobebuy.com
order inventory software buy cheap soft. Adobe InDesign CS4 purchase express software order managment software order control software.
23.06.2011 22:20 Buy Adobe Software Online @adobebuy.com
build to order software order picking software. Adobe InDesign CS4 order scheduling software purchase antivirus software buy discount software.
18.06.2011 18:27 Buy Adobe Software Online @adobebuy.com
purchase order tracking software order taking software. Autodesk AutoCAD Mechanical 2011 software installation order software to purchase sale purchase software.
18.06.2011 16:19 Buy Autodesk Software Online @bestsoftwarehere.com
order system software order system software. Autodesk AutoCAD Mechanical 2011 academic software purchase point of purchase software software for purchase.
18.06.2011 10:55 Buy Apple Inc. Software Online @bestsoftwarehere.com
windows xp software purchase. http://blog.nixdev.net/2008/11/19/how-run-byteflow-blog-engine-jython/ — soft sale.

Comments

No comments for this post

Required. 30 chars of fewer.

Required.

captcha image Please, enter symbols, which you see on the image