Differences between revisions 6 and 11 (spanning 5 versions)
Revision 6 as of 2008-01-15 23:36:09
Size: 2476
Editor: PhilipJenvey
Comment: update nose
Revision 11 as of 2008-01-17 01:39:41
Size: 3777
Editor: PhilipJenvey
Comment: clarify
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 (0.9.6.1) on Jython Requirements/TODO
============================================
Line 6: Line 6:
* The ability to install Pylons and all its dependencies: Installing Pylons and its dependencies
--------------------------------------
Line 8: Line 9:
  * distutils and setuptools (Mostly finished, See `SetuptoolsOnJython`_)   * distutils and setuptools **(Mostly finished, See** `SetuptoolsOnJython`_ **)**
Line 10: Line 11:
Ensure all dependencies' tests pass:   * Ensure all dependencies' tests pass
Line 12: Line 13:
* nose. Pylons projects require nose, but most packages (including Pylons) use nose as their own test runners. nose
----
Line 14: Line 16:
  requires: Pylons projects require nose, but most packages (including Pylons) use nose as their own test runners.
Line 16: Line 18:
  - the optparse module (added in r4018) requires:
Line 18: Line 20:
  - 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   * optparse module **(added in r4018)**
Line 20: Line 22:
  - a fix for the cell variable (variables used in closures) bug here: http://pylonshq.com/pasties/667   * a fix for the cell variable (variables used in closures) bug here: http://pylonshq.com/pasties/667 **(fixed in r4038)**
Line 22: Line 24:
* Paste, PasteDeploy and PasteScript   * 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
Line 24: Line 26:
* Mako Routes
------
All tests, except some which require paste.fixture (Paste is troublesome to import at this point), pass
Line 26: Line 30:
  - 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 28: Line 31:
* Beaker Paste, PasteDeploy and PasteScript
----------------------------------
requires:
Line 30: Line 35:
* Routes   * modulefinder module (imported in paste/__init__.py). Jython currently lacks it, and modulefinder relies on reading code objects via marshal.load
Line 32: Line 37:
  - 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   * 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
Line 34: Line 39:
* WebHelpers   * webbrowser module: paste.fixture imports it. Jython doesn't include it. It's a pretty simple module -- though it doesn't seem to work right on Jython when launching a console browser (like lynx or links). I think it's an os.system problem
Line 36: Line 41:
* FormEncode Mako
----
requires:
Line 38: Line 45:
* simplejson   * 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
----------
Line 46: Line 76:
* decorator decorator
---------
Line 48: Line 79:
  - Note: decorators aren't currently supported in Jython, however the decorator module doesn't actually use decorators (works on CPython 2.3)   * Note: decorators aren't currently supported in Jython, however the decorator module doesn't actually use decorators (works on CPython 2.3)
Line 50: Line 81:
Later down the road: Later down the road
===================
Line 52: Line 84:
* SQLAlchemy SQLAlchemy
----------
Line 54: Line 87:
  - 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"
  * The `Dialect Refactor II <http://www.sqlalchemy.org/trac/ticket/672>`_ ticket will need to be implemented to properly support using SQLAlchemy via Jython's DBAPI jdbc driver, `zxJDBC <http://jython.org/Project/userguide.html#database-connectivity-in-jython>`_.
  
  *
Frank Wierzbicki has done some preliminary work on using SQLAlchemy with Jython, info `here <http://groups.google.com/group/sqlalchemy/browse_frm/thread/d60db24fe1683a41/09320033f406d78b?hl=en&lnk=gst>`_, and is scheduled to give a talk at PyCon 2008: "Database development with Jython, SQLAlchemy, and Hibernate"

Turbogears 2
------------

  * Jim Baker has already started playing with Genshi on the `Jython modern branch <http://fisheye3.cenqua.com/browse/jython/branches/modern>`_

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

All tests, except some which require paste.fixture (Paste is troublesome to import at this point), pass

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
  • webbrowser module: paste.fixture imports it. Jython doesn't include it. It's a pretty simple module -- though it doesn't seem to work right on Jython when launching a console browser (like lynx or links). I think it's an os.system problem

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

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