PyLucene on Fedora 14

· Read in about 1 min · (130 words) ·

I couldn’t install pylucene simply by following command:

yum install pylucene

Nor did following work:

easy_install pylucene

Nor the following :-(

pip-python install pylucene

So. I had to build it myself. Here, I list those steps:

Install JCC

$ JCC_JDK=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 pip-python install jcc

Download pylucene pylucene

wget -c http://apache.mirrors.pair.com//lucene/pylucene/pylucene-2.4.1-1-src.tar.gz
tar zxf pylucene-2.4.1-1-src.tar.gz
cd pylucene-2.4.1-1

Build and install http://lucene.apache.org/pylucene/documentation/install.html

pushd jcc
# edit setup.py to match your environment
JCC_JDK=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 python setup.py build`
sudo python setup.py install
popd
# edit Makefile to match your environment

I had to update the Makefile for Fedora 14:

# Linux     (Fedora 14, Python 2.7, OpenJDK 1.6, setuptools 0.6.14)
PREFIX_PYTHON=/usr
ANT=ant
PYTHON=$(PREFIX_PYTHON)/bin/python
JCC=$(PYTHON) -m jcc --shared
NUM_FILES=2

Continue building

make
sudo make install
make test # (look for failures)

The last step make test gave some failures.