[pylucene-dev] Re: PyLucence Debian Package

Andi Vajda vajda at osafoundation.org
Fri Feb 3 17:42:56 UTC 2006

On Fri, 3 Feb 2006, Jeff Breidenbach wrote:

> Another possibility - maybe - is to package an older version of PyLucene
> that depends on Java Lucene 1.4.3. However, I suspect there are likely
> to be similar issues and an upatched Java Lucene 1.4.3 will not be a viable
> build dependency either.

The patching issue was worse with Java Lucene 1.4.3. Some patches were 
incorporated into Java Lucene 1.9 as was reasonable, improving the situation a 
bit but not resolving it completely.

> A third possibility is to simply wait and hope the situation gets better.
> Since both Java Lucene 1.9 and PyLucene have an rc in their version
> numbers, this is not a completely crazy idea. On the other hand, it
> may be a really long wait.

Sadly, the situation is not controlled by Java Lucene or PyLucene at this 
point. The patches are necessary because of bugs or issues with gcj, gcjh and 
javacc. As you say, it could be a really long wait, the javacc bug I filed is 
over a year old...
The real problem, though, is with gcj. Whenever the Java Lucene codebase 
changes in any significant manner, I have to look for 'new' gcj-related issues 
and patch them. When upgrading from 1.4.3 to 1.9, for example, I added the 
addClause() patch in QueryParser.java.

> A fourth possibility is to modify the Debian PyLucene package such
> that it first builds the patched Java Lucene .jar from .java files. That's
> kind of  messy, and redundant, but may not have any blockers.

It's a little messy as you say but this is exactly what a full build from 
scratch build of PyLucene entails. The steps can be summed up as follows:

    - svn export <specific rev> of Java Lucene
    - apply the patches
    - ant build Java Lucene with a Ant and a JDK
    - compile the .class files with gcj
    - compile the C++ files with g++
    - run swig to generate the python bindings
    - compile and link all these into a python extension shared library

I should add that this is a vast improvement over the PyLucene 1.0 / 1.4.3 
build process which started with Lucene 1.4.3 jars, unpacked them, re-compiled 
some Java Lucene sources after applying patches, re-created a jar, etc.. 
etc... At least, the current build procedures for PyLucene 1.9 make it 
relatively easy to keep up with Java Lucene developments on their svn trunk.

> The requirement to get into Debian main is a complete build from
> source, using a Free Software toolchain, contolled by the Debian
> packaging system. Other sections of Debian relax some of these
> requirements. In any case, I will look over other apects of the package
> for possible improvements.

I seems that the current PyLucene 1.9 build procedures satisfy these 
requirements, if one starts from the beginning as outlined in the build steps 
above, no ?


More information about the pkg-java-maintainers mailing list