Differences between revisions 4 and 35 (spanning 31 versions)
Revision 4 as of 2008-01-12 07:52:57
Size: 2329
Editor: PhilipJenvey
Comment: some updates, convert to rST
Revision 35 as of 2009-03-16 20:03:32
Size: 1027
Editor: PhilipJenvey
Comment: link to SQLAlchemy's page
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Getting Pylons (0.9.6.1) to run on Jython
=========================================
Pylons on Jython
================
Line 6: Line 6:
* The ability to install Pylons and all its dependencies: **Status**: `Jython is supported as of Pylons 0.9.7 <http://pylonshq.com/docs/en/0.9.7/jython/>`_
Line 8: Line 8:
  * distutils and setuptools (Mostly finished, See `SetuptoolsOnJython`_) Pending Improvements
====================
Line 10: Line 11:
Ensure all dependencies' tests pass: Support more of the out of the box optional components, such as:
Line 12: Line 13:
* Paste, PasteDeploy and PasteScript SQLAlchemy
----------
Line 14: Line 16:
* Mako See `SqlAlchemyOnJython`_
Line 16: Line 18:
  - mako uses the compiler module to parse Python code into AST. The compiler module is mostly pure Python code, but its guts are really the native parser module (which Jython lacks) Jinja2
------
Line 18: Line 21:
* Beaker Jinja2 `may work on Jython now <http://dev.pocoo.org/projects/jinja/ticket/320>`_. Its tests need to be converted to nosetests so the test suite can run on Jython to ensure this
Line 20: Line 23:
* nose Genshi
------
Jim Baker and Ariane Paola have played around with Genshi on Jython. Its use of pyexpat is the biggest roadblock. Jython now includes a pyexpat, but it's not fully compatible with CPython's (and doesn't support all the features Genshi uses).
Line 22: Line 27:
  - nose requires the optparse module (which Jython does not include and whose tests currently fail, last time I checked) and compiler modules (compiler requires the parser module which Jython lacks). nose only needs the compiler module to use compiler.consts.CO_GENERATOR; until there's a parser, maybe jython could provide a broken compiler module that doesn't import parser Turbogears 2
------------
Line 24: Line 30:
* Routes Ariane Paola made some progress porting TurboGears 2 components to Jython for Google's Summer of Code. Genshi and SQLAlchemy are the most important pieces that need porting
Line 26: Line 32:
  - I got all of routes' tests to pass on Jython well over a year ago so I don't expect too much trouble here -pjenvey

* WebHelpers

* FormEncode

* simplejson

  * `SetuptoolsOnJython`_ currently has trouble installing simplejson, because it attempts to compile its optional C extensions (that help performance). It expects to catch a distutils.errors.CCompilerError if the compilation fails, but Jython dies much earlier:

  File "/Users/pjenvey/src/java/jython-trunk/dist/Lib/distutils/command/build_ext.py", line 598, in get_ext_filename

  TypeError: cannot concatenate 'str' and 'NoneType' objects

* decorator

  - Note: decorators aren't currently supported in Jython, however the decorator module doesn't actually use decorators (works on CPython 2.3)

Later down the road:

* SQLAlchemy

  - The [http://www.sqlalchemy.org/trac/ticket/672 Dialect Refactor II] ticket will need to be implemented to properly support using SQLAlchemy via Jython's DBAPI jdbc driver, [http://jython.org/Project/userguide.html#database-connectivity-in-jython zxJDBC].
  - Frank Wierzbicki has done some preliminary work on using SQLAlchemy with Jython, info [http://groups.google.com/group/sqlalchemy/browse_frm/thread/d60db24fe1683a41/09320033f406d78b?hl=en&lnk=gst here], and is scheduled to give a talk at PyCon 2008: "Database development with Jython, SQLAlchemy, and Hibernate"
Older details: `PylonsOnJythonOld`_

Pylons on Jython

Status: Jython is supported as of Pylons 0.9.7

Pending Improvements

Support more of the out of the box optional components, such as:

SQLAlchemy

See SqlAlchemyOnJython

Jinja2

Jinja2 may work on Jython now. Its tests need to be converted to nosetests so the test suite can run on Jython to ensure this

Genshi

Jim Baker and Ariane Paola have played around with Genshi on Jython. Its use of pyexpat is the biggest roadblock. Jython now includes a pyexpat, but it's not fully compatible with CPython's (and doesn't support all the features Genshi uses).

Turbogears 2

Ariane Paola made some progress porting TurboGears 2 components to Jython for Google's Summer of Code. Genshi and SQLAlchemy are the most important pieces that need porting

Older details: PylonsOnJythonOld

PylonsOnJython (last edited 2009-09-14 22:04:24 by PhilipJenvey)