> The problem with distributing JCC and PyLucene binaries is that you need to 
> be careful with classpath and shared library path issues.
> PyLucene's lucene.CLASSPATH variable is set to point to the lucene jar files 
> that it contains as egg resources. The path is absolute but computed at 
> runtime from a relative stub (see lucene....egg/lucene/__init__.py).
> The shared library path, on the other hand, is baked into the jcc binaries 
> via the rpath link flag. Different installs have java in different locations 
> (albeit, not the case on mac) and the java shared libs might not get found 
> until you workaround the bogus path baked in via LD_LIBRARY_PATH (on Linux) 
> and PATH on Windows (or DYLD_LIBRARY_PATH on Mac, but it's not a problem in 
> Mac since Apple pre-installs java into a known framework location).

Yes, this is an issue.  Not on OS X, since it's a predictable
configuration, or on Linux, since it's so unpredictable that I build
everything from source on the target machine, but for Windows.  On
Windows, UpLib looks in the registry of the target machine to see
where Java is, and makes sure to use fully-qualified pathnames to run
it.  So it seems that, on Windows, I'm going to have to set PATH in
the Python program that uses PyLucene before actually importing
"lucene", right?  Will Python's "os.environ['PATH']" work for this?  I
can just check to see if the appropriate location is on PATH already,
and add it if it isn't.

Bill
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to