Loading ...
Sorry, an error occurred while loading the content.

4830Re: [Cheetahtemplate-discuss] Importing Cheetah.Template.Template unusually slow?

Expand Messages
  • R. Tyler Ballance
    Feb 1, 2010
      On Tue, 02 Feb 2010, Matthew Beauregard wrote:

      > >Your workaround is fine, but you might want to look into why
      > >you're not using
      > >the compiled namemapper
      >
      > Actually, yeah, that's just bit me. There is (and has been for
      > years) a difference between the C and Python NameMappers that my
      > code triggers so parts of it only work with the C mapper. That's
      > been fine until now when I'm trying to build from git/next.

      Ah yes indeed, this is another thing I've messed up in the next branch and
      haven't had a chance to fix yet :)

      I made a good chunk of changes without checking Hudson to see how they were
      performing on other versions of Python and other platforms. This past weekend I
      went back to Hudson and realized my error.

      You can check out the current build results here:
      http://avocado.monkeypox.org:8080/job/Cheetah_next/

      My apologies, I typically work under Python 2.6 so I was completely oblivious
      to the breakages on Python 2.4 and 2.5

      I'll probably fix it tonight or tomorrow sometime; I'll update the thread when
      it's there

      >
      > From what I can see the compiled mapper isn't building right for me:
      >
      > gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
      > -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall
      > -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE
      > -arch i386 -arch ppc -pipe -
      > I/System/Library/Frameworks/Python.framework/Versions/2.5/include/
      > python2.5 -c cheetah/c/_namemapper.c -o build/temp.macosx-10.5-
      > i386-2.5/cheetah/c/_namemapper.o
      > cheetah/c/_namemapper.c: In function ?setNotFoundException?:
      > cheetah/c/_namemapper.c:38: warning: implicit declaration of
      > function ?PyUnicode_FromFormat?
      > cheetah/c/_namemapper.c:38: warning: assignment makes pointer from
      > integer without a cast
      > cheetah/c/_namemapper.c: In function ?setNotFoundException?:
      > cheetah/c/_namemapper.c:38: warning: implicit declaration of
      > function ?PyUnicode_FromFormat?
      > cheetah/c/_namemapper.c:38: warning: assignment makes pointer from
      > integer without a cast
      > cheetah/c/_namemapper.c: In function ?wrapInternalNotFoundException?:
      > cheetah/c/_namemapper.c:62: warning: assignment makes pointer from
      > integer without a cast
      > cheetah/c/_namemapper.c: In function ?wrapInternalNotFoundException?:
      > cheetah/c/_namemapper.c:62: warning: assignment makes pointer from
      > integer without a cast
      >
      > So then I get:
      >
      > >>> from Cheetah._namemapper import NotFound, valueForKey, valueForName
      > Traceback (most recent call last):
      > File "<stdin>", line 1, in <module>
      > ImportError: dlopen(/Library/Python/2.5/site-packages/Cheetah-2.4.2-
      > py2.5-macosx-10.5-i386.egg/Cheetah/_namemapper.so, 2): Symbol not
      > found: _PyUnicode_FromFormat
      > Referenced from: /Library/Python/2.5/site-packages/Cheetah-2.4.2-
      > py2.5-macosx-10.5-i386.egg/Cheetah/_namemapper.so
      > Expected in: dynamic lookup
      >
      > thanks,
      > Matthew
      >
      Cheers,
      -R. Tyler Ballance
      --------------------------------------
      Jabber: rtyler@...
      GitHub: http://github.com/rtyler
      Twitter: http://twitter.com/agentdero
      Blog: http://unethicalblogger.com
    • Show all 24 messages in this topic