On Mon, May 18, 2009 at 7:58 AM, Ian Forbeswrote: > Hi All > > Others have reported on the "ihooks" import bug, as well as problems > with mxDatetime. This post relates to those bugs. > > I have a site running quixote for some one of our internal applications. > It runs on a Debian box currently running "lenny", which by default > installs python 2.5 and quixote 2.5, so far so good. > > I have a desktop machine which runs "Ubuntu" which I have recently > upgraded to "Jaunty". I have a copy of the application installed on this > box for that I user for development. Ubunty Jaunty by default installs > Python 2.6 and Quixote 2.5. > > First problem is the "ihooks import bug". The application no longer > works. The work around for this is to include in the appropriate > __init__.py: > > from quixote.ptl import compile_package > compile_package(__path__) > > The problem is that "compile_package" is not present in Quixote 2.5, it > first appeared in Quixote 2.6. > > I am not sure if it is a known requirement to upgrade to Quixote 2.6 > before installing Python 2.6, but the net result of the above bugs and > workaround implies that this is the case. In the meantime, the default > packages in Ubuntu Jaunty are not useable. It looks like it is. The CHANGES file in 2.6 says: """ The ihooks module is broken in Python 2.6 and will be gone in Python 3. Provide compile_package() as an alternative method of compiling PTL templates. """ Perhaps that'll give me another reason to convert my PTL templates to Mako, but I don't have time right now. > The work-around seems to be run the application under Python 2.5. (If > anybody can point to simple "Howto" to run a non default version of > Python on Debian or Ubuntu it might save me some time.) It's easy. 1) Read the README to see which ``lib*-dev`` packages you may need to install. 2) Install the ``build-essential`` package, which depends on gcc and the linker and all that little stuff you need. 3) Run "./configure" to set the program to install into /usr/local, or "./configure --prefix/home/me/my-quixote-workspace" to install elsewhere. 4) Run "make". 5) Run "(sudo) make install". Then just make sure the right version of python or python2.5 is in your PATH, or run it using the absolute path. I think there's a configure option to suppress the 'python' binary and create only 'python2.5'. That would prevent programs depending on 2.6 from accidentally launching the wrong version. -- Mike Orr