lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andi Vajda <>
Subject Re: Makefile question
Date Fri, 13 Feb 2009 06:20:13 GMT

On Thu, 12 Feb 2009, Andi Vajda wrote:

> On Thu, 12 Feb 2009, Jacob Floyd wrote:
>> Simple question regarding the Makefile:
>> --- snippet ---
>> 	rm -f 
>> $(LUCENE)/contrib/regex/src/java/org/apache/lucene/search/regex/
>> 	rm -f 
>> $(LUCENE)/contrib/regex/src/java/org/apache/regexp/
>> 	cd $(LUCENE)/contrib/regex; $(ANT) -Dversion=$(LUCENE_VER)
>> --- snippet ---
>> Why was it necessary to remove these .java files? Is this a change
>> that needs to become part of lucene itself?
> These file depend on yet another thirdparty project, Apache Regex (?), and I 
> didn't want to have a dependency on that. Given that Python has excellent 
> regular expression support, I replaced these files with a Python-based 
> implementation.
> It turns out that the Python implementation is currently missing in PyLucene 
> (and has been since the move to JCC). I should have that resurrected shortly 
> but it involves a patch to the Lucene Regex contrib package. You might want 
> to consider skipping that contrib package in your ebuild.

Correction: I replied too fast, sorry. The Python implementation indeed 
existed in the gcj times but in the current PyLucene, the default 
JavaUtilRegexCapabilities class is used and works just fine. The gcj java 
runtime library, libgcj, didn't have support for regex implemented at the 
time so I had to use Python's instead. The test/ test 
passes and illustrates the functionality.

Still, I removed the two files you asked about because they depend on third 
party libraries that I didn't want PyLucene to depend on.

In other words, contrary to what I wrote earlier, you can include the regex 
contrib with your PyLucene ebuild. No extra dependencies or patches are 
necessary provided these two files are removed first.


View raw message