PyLucene on Fedora 14

I couldn’t install pylucene simply by doing yum install pylucene. Neither did easy_install pylucene work, and nor pip-python install pylucene. So I had to build it myself. Here, I list those steps:

A. Install JCC

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

B. 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

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

1. pushd jcc
2. edit setup.py to match your environment
3. JCC_JDK=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 python setup.py build
4. sudo python setup.py install
5. popd
6. edit Makefile to match your environment

I had to update the Makefile for Fedora 14:

  1. 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

D. Continue building

7. make
8. sudo make install
9. make test (look for failures)

The last step make test gave some failures.

Advertisements