Differences between revisions 3 and 4
Revision 3 as of 2007-09-23 21:02:53
Size: 1405
Editor: PhilipJenvey
Comment: updates
Revision 4 as of 2008-01-12 07:52:57
Size: 2329
Editor: PhilipJenvey
Comment: some updates, convert to rST
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
The things/steps needed to get Pylons running on Jython: #format rst

Getting Pylons (0.9.6.1) to run on Jython
=========================================
Line 5: Line 8:
  - distutils and setuptools (See SetuptoolsOnJython)   * distutils and setuptools (Mostly finished, See `SetuptoolsOnJython`_)
Line 13: Line 16:
  - 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)
Line 16: Line 21:
  - nose requires the optparse (easy) and compiler modules (sort of easy -- compiler requires the parser module, which won't be easy to get on Jython). nose only needs the compiler module to use compiler.consts.CO_GENERATOR; maybe jython could provide a broken compiler module that doesn't import parser.
- 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
Line 20: Line 26:
  - (I actually got all of routes' tests to pass on Jython well over a year ago -pjenvey)   - 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
Line 28: Line 34:
  * `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
Line 34: Line 46:
* 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] * 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"

Getting Pylons (0.9.6.1) to run on Jython

  • The ability to install Pylons and all its dependencies:

Ensure all dependencies' tests pass:

  • Paste, PasteDeploy and PasteScript

  • Mako

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

  • nose

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

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

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