lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andi Vajda <>
Subject Re: [VOTE] Release PyLucene 3.5.0 rc2
Date Thu, 08 Dec 2011 17:59:31 GMT

On Thu, 8 Dec 2011, Andi Vajda wrote:

> It seems that adding, before if __name__ == '__main__':
>  from jcc import _jcc
> works just fine on 2.7 and 2.6 as well.
> Speaking of which, I don't see when __name__ would be == '__main__'. I tried 
> various combinations with pdb and __name__ is always == 'jcc'.
> If that makes sense to you as well, I can change that block to just say:

>  from _jcc import initVM

It doesn't look like this statement is needed either.
Can you remember why it was there ? (not saying you put it there, just 
asking, I'm blanking)

Maybe just replacing the whole 'if __name__  ...' block with just:
   from jcc import _jcc

is enough for all cases ?
(see new version below)


  import os, sys

  if sys.platform == 'win32':

     if '--find-jvm-dll' in sys.argv:
         from windows import add_jvm_dll_directory_to_path

     from jcc.config import SHARED
     if SHARED:
         path = os.environ['Path'].split(os.pathsep)
         eggpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
         if eggpath not in path:
             path.insert(0, eggpath)
             os.environ['Path'] = os.pathsep.join(path)

  from jcc import _jcc

  CLASSPATH=os.path.join(os.path.abspath(os.path.dirname(__file__)), "classes")

View raw message