[pylucene-dev] building JCC on Windows with MinGW

Andi Vajda vajda at osafoundation.org
Thu Mar 20 09:39:15 PDT 2008


On Thu, 20 Mar 2008, Dirk Rothe wrote:

>>> So, we need to figure out how to do this for Windows Python.  We really 
>>> want Python (rather, the JCC __init__.py file) to look in the Windows 
>>> registry and do the right thing with what it finds there (basically, 
>>> adding the right location for the jvm.dll to sys.path), before it attempts 
>>> to import either "jcc" or "_jcc".
>> 
>> It's not sys.path (that's where PYTHONPATH ends up), it's the env's PATH 
>> or, more precisely, the process's executable search path that needs to be 
>> updated. I don't know of a linker way to do this on Windows. Once the 
>> process has started, my understanding is that it's too late already.
>> 
>> In Chandler, we have a starter process that starts python after setting the 
>> proper search path.
>
> We are setting up os.path in sitecustomize.py (in the embedded python 
> installation) - pointing to the embedded JVM. So it seems to work in-process 
> as well. Tested under WinXP/Win2003 Server/Vista.

Oh, this sounds like a better idea. Bill, you're shipping Python on Windows, 
right ? In that case, putting this code into sitecustomize.py is simpler 
than integrating this into JCC in a safe and deterministic manner.

Andi..


More information about the pylucene-dev mailing list