Unterschiede zwischen den Revisionen 2 und 3
Revision 2 vom 2008-04-18 00:55:34
Größe: 1845
Autor: lars
Kommentar: compiling jcc finished
Revision 3 vom 2008-04-18 01:32:19
Größe: 3035
Autor: lars
Kommentar: almost done
Gelöschter Text ist auf diese Art markiert. Hinzugefügter Text ist auf diese Art markiert.
Zeile 1: Zeile 1:
||<tablestyle="float:right;"> '''Inhalt'''[[TableOfContents]] || ||<tablestyle="float: right;"> '''Inhalt'''[[TableOfContents]] ||
Zeile 3: Zeile 3:
Zeile 10: Zeile 9:
The installation of !PyLucene is worth a howto, since the settings of the installer are statically put together without any auto-configuration.
Zeile 11: Zeile 12:
||''Variable''||''Bedeutung''||''Beispiel''||
||''Variable'' ||''Bedeutung'' ||''Beispiel'' ||
Zeile 18: Zeile 18:
Zeile 20: Zeile 21:
Zeile 23: Zeile 23:
Zeile 25: Zeile 24:
Zeile 28: Zeile 26:
 * unpack it in a directory of your choice (''tar xzf ...''')
 * change into the source directory 
 * unpack it in a directory of your choice (''tar xzf ...'') 
 * change into the source directory
Zeile 33: Zeile 31:
# install required packages: {{{
 1.
install required packages: {{{
Zeile 36: Zeile 35:
# ''fix'' the pre-settings in ''jcc/setup.py'' - a little bit dirty, but it works (alternative: fix the INCLUDE, CFLAGS and LFLAGS for linux in ''jcc/setup.py''): {{{  1. work around the wrong pre-settings in ''jcc/setup.py'' - a little bit dirty, but it works (alternative: fix the INCLUDE, CFLAGS and LFLAGS for linux in ''jcc/setup.py''):{{{
Zeile 39: Zeile 38:
# compile JCC: {{{  1. compile JCC: {{{
Zeile 43: Zeile 42:
 1. install JCC (as root user): {{{
python setup.py install
}}}
 1. fix the installation location with a symlink: {{{
ln -s JCC-1.8-py2.4-linux-i686.egg/jcc /usr/lib/python2.4/site-packages/
}}}
  1. check if it works (otherwise you may have to adjust the path above): {{{
test -e /usr/lib/python2.4/site-packages/jcc && echo "OK" || echo "Failed"
}}}

== Compile PyLucene ==
'''Please notice''': the installer's Makefile does not like to restart after errors. Use ''make realclean'' (instead of the usual ''distclean'') before trying to restart/continue compilation! Beware: this requires a working internet connection for a repository download.

 1. install required packages: {{{
aptitude install ant make subversion
}}}
 1. uncomment the appropriate bunch of settings in ''Makefile'' - the one for ''Linux (Ubuntu 6.06, Python 2.4, Java 1.5)'': {{{
PREFIX_PYTHON=/usr
ANT=ant
PYTHON=$(PREFIX_PYTHON)/bin/python
JCC=$(PYTHON) $(PREFIX_PYTHON)/lib/python2.4/site-packages/jcc/__init__.py
NUM_FILES=1

}}}

InhaltTableOfContents

What is it about?

[http://pylucene.osafoundation.org/ PyLucene] is a [http://python.org/ python] interface for the [http://lucene.apache.org/ Lucene] indexing engine.

Indexing engines are used to parse data and store the content in way that is optimized for searching through it.

Another popular indexing engine is [http://xapian.org Xapian], but since its installation in Debian is more than trivial, there is no need for a howto :).

The installation of PyLucene is worth a howto, since the settings of the installer are statically put together without any auto-configuration.

Names and values

Variable

Bedeutung

Beispiel


Preparation

Which version of Lucene?

Currently there are two different releases of PyLucene available:

The developer of PyLucene dropped support for GCJ since version 2.3, thus it should be reasonable to use the JCC sources.

Installation

Get the source

Compile JCC

You may skip this step, if you already have a working JCC installation.

  1. install required packages:

    aptitude install sun-java5-jdk g++ java-gcj-compat-dev python-dev
  2. work around the wrong pre-settings in jcc/setup.py - a little bit dirty, but it works (alternative: fix the INCLUDE, CFLAGS and LFLAGS for linux in jcc/setup.py):

    ln -s java-1.5.0-sun /usr/lib/jvm/java-6-sun
  3. compile JCC:

    cd jcc
    python setup.py build
  4. install JCC (as root user):

    python setup.py install
  5. fix the installation location with a symlink:

    ln -s JCC-1.8-py2.4-linux-i686.egg/jcc /usr/lib/python2.4/site-packages/
    1. check if it works (otherwise you may have to adjust the path above):

      test -e /usr/lib/python2.4/site-packages/jcc && echo "OK" || echo "Failed"

Compile PyLucene

Please notice: the installer's Makefile does not like to restart after errors. Use make realclean (instead of the usual distclean) before trying to restart/continue compilation! Beware: this requires a working internet connection for a repository download.

  1. install required packages:

    aptitude install ant make subversion
  2. uncomment the appropriate bunch of settings in Makefile - the one for Linux (Ubuntu 6.06, Python 2.4, Java 1.5):

    PREFIX_PYTHON=/usr
    ANT=ant
    PYTHON=$(PREFIX_PYTHON)/bin/python
    JCC=$(PYTHON) $(PREFIX_PYTHON)/lib/python2.4/site-packages/jcc/__init__.py
    NUM_FILES=1

Creative Commons Lizenzvertrag
This page is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.