On Apr 15, 2013, at 3:52, Michael McCandless <[email protected]> wrote:
> I'm having trouble on an Ubuntu 12.10 box, using Java 1.7_07 and Python 2.7.3. > > I was able to build and install both JCC and PyLucene, apparently > successfully. > > I can "import lucene" in Python and print lucene.VERSION and confirm it's > 4.2.1. > > lucene.initVM(lucene.CLASSPATH) succeeds. > > Yet, there are no Lucene classes in the lucene module? When I print > dir(lucene) I just get this: > > ['CLASSPATH', 'ConstVariableDescriptor', 'FinalizerClass', > 'FinalizerProxy', 'InvalidArgsError', 'JArray', 'JArray_bool', > 'JArray_byte', 'JArray_char', 'JArray_double', 'JArray_float', > 'JArray_int', 'JArray_long', 'JArray_object', 'JArray_short', > 'JArray_string', 'JCCEnv', 'JCC_VERSION', 'JObject', 'JavaError', > 'PrintWriter', 'StringWriter', 'VERSION', '__builtins__', '__dir__', > '__doc__', '__file__', '__name__', '__package__', '__path__', > '_lucene', 'findClass', 'getVMEnv', 'initVM', 'makeClass', > 'makeInterface', 'os', 'sys'] > > Am I missing something silly...? Shouldn't Lucene's classes (eg > FSDirectory) be visible in globals() in the lucene module? The one big change on the PyLucene side is that now Lucene classes are in a package structure that mirrors the Java one. Thus, to get FSDirectory you now need to: import lucene from org.apache.lucene.store import FSDirectory Besides providing initVM() and a few other things such as JArray, importing lucene also installs the org package tree. Andi.. > > Mike McCandless > > http://blog.mikemccandless.com > > On Sat, Apr 13, 2013 at 5:51 PM, Andi Vajda <[email protected]> wrote: >> >> It looks like the time has finally come for a PyLucene 4.x release ! >> >> The PyLucene 4.2.1-0 release tracking the recent release of Apache Lucene >> 4.2.1 is ready. >> >> A release candidate is available from: >> http://people.apache.org/~vajda/staging_area/ >> >> A list of changes in this release can be seen at: >> http://svn.apache.org/repos/asf/lucene/pylucene/branches/pylucene_4_2/CHANGES >> >> PyLucene 4.2.1 is built with JCC 2.16 included in these release artifacts: >> http://svn.apache.org/repos/asf/lucene/pylucene/trunk/jcc/CHANGES >> >> A list of Lucene Java changes can be seen at: >> http://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_4_2_1/lucene/CHANGES.txt >> >> Please vote to release these artifacts as PyLucene 4.2.1-0. >> >> Thanks ! >> >> Andi.. >> >> ps: the KEYS file for PyLucene release signing is at: >> http://svn.apache.org/repos/asf/lucene/pylucene/dist/KEYS >> http://people.apache.org/~vajda/staging_area/KEYS >> >> pps: here is my +1
