Andi Vajda <va...@apache.org> wrote:

> I just tried this myself

By "this", do you mean 64-bit Windows 7, or Python 2.7?

> and it seems that with Python 2.7 __name__ is
> never equal to '__main__' in jcc's __init__.py. So, jcc.__main__ is
> never imported implicitely from __init__.py and hence --find-jvm-dll
> is ineffective.
> 
> I moved the --find-jvm-dll trickery to __init__.py and that seems to
> solve the problem. Of course, this is all masked if the PATH already
> contains the JRE directories.
> 
> Andi..

Thanks.  Though I thought that the --find-jvm-dll switch only worked if
it was explicitly specified, which I wasn't doing.  So while that's one
Python 2.7 issue, I don't think that's the problem I was seeing, right?

I'm going to go back to 32-bit XP, and get things working with Python
2.7 on that platform.  Once I have that, I'll go back to 64-bit Windows 7.

Bill

> >>>> I got a brand-new Windows 7 machine, and thought I'd try building
> >>>> PyLucene with a newer version of Python, 2.7, the 32-bit version.
> >>>>
> >>>> I also had to move to setuptools-0.6c11, because 0.6c9 doesn't seem to
> >>>> work with Python 2.7.  Using 32-bit Java 6.0_22.
> >>>>
> >>>> But I can't get JCC to run here:
> >>>>
> >>>> sh-3.1$ which jcc.dll
> >>>> /c/Python27/Lib/site-packages/JCC-2.6-py2.7-win32.egg/jcc.dll
> >>>> sh-3.1$ which jvm.dll
> >>>> /c/Program Files (x86)/Java/jre6/bin/client/jvm.dll
> >>>> sh-3.1$ python -m jcc.__main__ --help
> >>>> c:\Python27\python.exe: DLL load failed: The specified module could not 
> >>>> be found.
> >>>> sh-3.1$
> >>>>
> >>>> sh-3.1$ python -c 'import os; print os.environ.get("PATH")'
> >>>> c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;C:\MinGW\msys\1.0\bin;C:\MinGW\bin;c:\Python27;c:\Program
> >>>>  Files\apache-ant-1.8.1\bin;c:\Program Files 
> >>>> (x86)\Java\jre6\bin\client;c:\Python27\Lib\site-packages\JCC-2.6-py2.7-win32.egg
> >>>>
> >>>> It seems to build and install OK, but when I run python in verbose mode,
> >>>> I see
> >>>>
> >>>> import jcc # directory 
> >>>> c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc
> >>>> # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc 
> >>>> matches 
> >>>> c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.py
> >>>> import jcc # precompiled from 
> >>>> c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc
> >>>> # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc 
> >>>> matches 
> >>>> c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.py
> >>>> import jcc.config # precompiled from 
> >>>> c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc
> >>>> c:\Python27\python.exe: DLL load failed: The specified module could not 
> >>>> be found.
> >>>>
> >>>> So, what's in jcc/config.py?  Here's what's in it:
> >>>>
> >>>> INCLUDES=['C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include', 
> >>>> 'C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include\\win32']
> >>>> CFLAGS=['-fno-strict-aliasing', '-Wno-write-strings']
> >>>> DEBUG_CFLAGS=['-O0', '-g', '-DDEBUG']
> >>>> LFLAGS=['-LC:\\Program Files (x86)\\Java\\jdk1.6.0_22\\lib', '-ljvm']
> >>>> IMPLIB_LFLAGS=['-Wl,--out-implib,%s']
> >>>> SHARED=True
> >>>> VERSION="2.6"
> >>>>
> >>>> Any ideas about what's going wrong?  I suspect those parentheses in the
> >>>> path to the jvm, myself.
> >>>>
> >>>> Bill
> >>>>
> >

Reply via email to