Pylons (0.9.6.1) on Jython Requirements/TODO

Installing Pylons and its dependencies

  • distutils and setuptools (Mostly finished, See SetuptoolsOnJython )
  • Ensure all dependencies' tests pass

nose

Pylons projects require nose, but most packages (including Pylons) use nose as their own test runners.

requires:

  • optparse module (added in r4018)
  • a fix for the cell variable (variables used in closures) bug here: http://pylonshq.com/pasties/667 (fixed in r4038)
  • compiler package (and 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

Routes

Pretty much all tests pass: though some tests require Paste's paste.fixture, which is troublesome to import

Paste, PasteDeploy and PasteScript

requires:

  • modulefinder module (imported in paste/__init__.py). Jython currently lacks it, and modulefinder relies on reading code objects via marshal.load
  • subprocess module: if it doesn't exist (Python 2.3) it uses a version copied over from CPython 2.4 (paste.util.subprocess24). paste.util.subprocess24 dies on attempting to import fcntl, so Jython needs to provide subprocess

Mako

requires:

  • 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)

Beaker

requires:

  • Paste (for paste.fixture)
  • base64.b64encode: might die on an attempting to import b64encode in beaker.crypto.PBKDF2 (at least it does when the tests are run)

WebHelpers

requires:

  • routes
  • simplejson

FormEncode

requires:

  • gettext (which requires the locale module, which Jython lacks)

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 Dialect Refactor II ticket will need to be implemented to properly support using SQLAlchemy via Jython's DBAPI jdbc driver, zxJDBC.
  • Frank Wierzbicki has done some preliminary work on using SQLAlchemy with Jython, info here, and is scheduled to give a talk at PyCon 2008: "Database development with Jython, SQLAlchemy, and Hibernate"

Turbogears 2