Pylons supports Jython as of v0.9.7.
The installation process is the same as CPython, as described in Getting Started. At least Jython 2.5b2 is required.
First, install snakefight:
$ easy_install snakefight
This adds an additional command to distutils: bdist_war.
Pylons applications are loaded from Paste, via its paste.app_factory entry point and a Paste style configuration file. bdist_war knows how to setup Paste apps for deployment when specified the --paste-config option:
$ paster make-config MyApp production.ini $ jython setup.py bdist_war --paste-config production.ini
As with any distutils command the preferred options can instead be added to the setup.cfg in the root directory of the project:
[bdist_war] paste-config = production.ini
Then we can simply run:
$ jython setup.py bdist_war
bdist_war creates a .war with the following:
With the --paste-config option, it also:
For further information/usages, see snakefight’s documentation.