On Wed, 7 Dec 2011, Bill Janssen wrote:

This part of the PyLucene Makefile is still screwed up:

# Mac OS X 10.5 (32-bit Python 2.5, Java 1.5)
#PREFIX_PYTHON=/usr
#ANT=ant
#PYTHON=$(PREFIX_PYTHON)/bin/python
#JCC=$(PYTHON) -m jcc --shared
#NUM_FILES=4

The way that jcc/__init__.py is now written, there's no way to invoke it
with "-m jcc", even on Python versions where that's supposed to work.
The last line, "_jcc.CLASSPATH = CLASSPATH" will always fail, because "_jcc"
isn't imported anywhere.

I'm a bit confused about how this can or cannot work.
For whatever it's worth, with Python 2.7, running with -m jcc works fine here.

That being said, I don't see how this statement:
 _jcc.CLASSPATH = CLASSPATH

can work at all since there is nothing visibly importing _jcc.
Something puts it there, though, because it works.

Can you shed some light on this ?

... debugging a bit further ... via pdb ...

Apparently, the statement:
   from _jcc import initVM

causes the _jcc symbol to appear.

This could be a side-effect of setuptools. I vaguely remember someone saying that this didn't work with distutils only.

If you can reproduce the failure, does adding a line before if __name__ ...:
  import _jcc

solve the problem for you ?

Andi..

Reply via email to