Configured build for Ubuntu and added Stempel polish analyzer
[pylucene.git] / doc / documentation / install.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <head>
4 <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta content="Apache Forrest" name="Generator">
6 <meta name="Forrest-version" content="0.8">
7 <meta name="Forrest-skin-name" content="pelt">
8 <title>Installing PyLucene</title>
9 <link type="text/css" href="../skin/basic.css" rel="stylesheet">
10 <link media="screen" type="text/css" href="../skin/screen.css" rel="stylesheet">
11 <link media="print" type="text/css" href="../skin/print.css" rel="stylesheet">
12 <link type="text/css" href="../skin/profile.css" rel="stylesheet">
13 <script src="../skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="../skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="../skin/fontsize.js" language="javascript" type="text/javascript"></script>
14 <link rel="shortcut icon" href="../">
15 </head>
16 <body onload="init()">
17 <script type="text/javascript">ndeSetTextSize();</script>
18 <div id="top">
19 <!--+
20     |breadtrail
21     +-->
22 <div class="breadtrail">
23 <a href="http://www.apache.org/">apache</a> &gt; <a href="http://lucene.apache.org/">lucene</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
24 </div>
25 <!--+
26     |header
27     +-->
28 <div class="header">
29 <!--+
30     |start group logo
31     +-->
32 <div class="grouplogo">
33 <a href="http://lucene.apache.org/"><img class="logoImage" alt="Lucene" src="../images/lucene_green_150.gif" title="Lucene Description"></a>
34 </div>
35 <!--+
36     |end group logo
37     +-->
38 <!--+
39     |start Project Logo
40     +-->
41 <div class="projectlogoA1">
42 <a href="http://lucene.apache.org/pylucene/"><img class="logoImage" alt="PyLucene" src="../images/project.png" title="PyLucene Description"></a>
43 </div>
44 <!--+
45     |end Project Logo
46     +-->
47 <!--+
48     |start Tabs
49     +-->
50 <ul id="tabs">
51 <li class="current">
52 <a class="selected" href="../index.html">PyLucene</a>
53 </li>
54 <li>
55 <a class="unselected" href="../jcc/index.html">JCC</a>
56 </li>
57 </ul>
58 <!--+
59     |end Tabs
60     +-->
61 </div>
62 </div>
63 <div id="main">
64 <div id="publishedStrip">
65 <!--+
66     |start Subtabs
67     +-->
68 <div id="level2tabs"></div>
69 <!--+
70     |end Endtabs
71     +-->
72 <script type="text/javascript"><!--
73 document.write("Last Published: " + document.lastModified);
74 //  --></script>
75 </div>
76 <!--+
77     |breadtrail
78     +-->
79 <div class="breadtrail">
80
81              &nbsp;
82            </div>
83 <!--+
84     |start Menu, mainarea
85     +-->
86 <!--+
87     |start Menu
88     +-->
89 <div id="menu">
90 <div onclick="SwitchMenu('menu_1.1', '../skin/')" id="menu_1.1Title" class="menutitle">About</div>
91 <div id="menu_1.1" class="menuitemgroup">
92 <div class="menuitem">
93 <a href="../index.html" title="Welcome to PyLucene">Index</a>
94 </div>
95 </div>
96 <div onclick="SwitchMenu('menu_selected_1.2', '../skin/')" id="menu_selected_1.2Title" class="menutitle" style="background-image: url('../skin/images/chapter_open.gif');">Documentation</div>
97 <div id="menu_selected_1.2" class="selectedmenuitemgroup" style="display: block;">
98 <div class="menupage">
99 <div class="menupagetitle">Installation</div>
100 </div>
101 <div class="menuitem">
102 <a href="../documentation/readme.html">Features</a>
103 </div>
104 </div>
105 <div onclick="SwitchMenu('menu_1.3', '../skin/')" id="menu_1.3Title" class="menutitle">Resources</div>
106 <div id="menu_1.3" class="menuitemgroup">
107 <div class="menuitem">
108 <a href="http://www.apache.org/dyn/closer.cgi/lucene/pylucene/">Releases</a>
109 </div>
110 <div class="menuitem">
111 <a href="../resources/version_control.html">Source Code</a>
112 </div>
113 <div class="menuitem">
114 <a href="../resources/mailing_lists.html">Mailing Lists</a>
115 </div>
116 <div class="menuitem">
117 <a href="http://issues.apache.org/jira/browse/PyLucene">Issue Tracking</a>
118 </div>
119 </div>
120 <div id="credit"></div>
121 <div id="roundbottom">
122 <img style="display: none" class="corner" height="15" width="15" alt="" src="../skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
123 <!--+
124   |alternative credits
125   +-->
126 <div id="credit2"></div>
127 </div>
128 <!--+
129     |end Menu
130     +-->
131 <!--+
132     |start content
133     +-->
134 <div id="content">
135 <div title="Portable Document Format" class="pdflink">
136 <a class="dida" href="install.pdf"><img alt="PDF -icon" src="../skin/images/pdfdoc.gif" class="skin"><br>
137         PDF</a>
138 </div>
139 <h1>Installing PyLucene</h1>
140 <div id="minitoc-area">
141 <ul class="minitoc">
142 <li>
143 <a href="#building">Building PyLucene</a>
144 <ul class="minitoc">
145 <li>
146 <a href="#requirements">Requirements</a>
147 </li>
148 <li>
149 <a href="#impatient">For the Impatient Ones</a>
150 </li>
151 <li>
152 <a href="#restofus">For the Rest of Us</a>
153 </li>
154 </ul>
155 </li>
156 <li>
157 <a href="#solaris">Notes for Solaris</a>
158 </li>
159 </ul>
160 </div>
161     
162 <a name="N1000D"></a><a name="building"></a>
163 <h2 class="boxed">Building PyLucene</h2>
164 <div class="section">
165 <p>
166         PyLucene is completely code-generated by JCC whose sources are
167         included with the PyLucene sources.<br>
168       
169 </p>
170 <a name="N10018"></a><a name="requirements"></a>
171 <h3 class="boxed">Requirements</h3>
172 <p>
173           To build PyLucene a Java Development Kit (JDK)
174           and <a href="http://ant.apache.org">Ant</a> are required; use of the 
175           resulting PyLucene binaries requires only a Java Runtime Environment
176           (JRE).
177         </p>
178 <p>
179           The <a href="http://pypi.python.org/pypi/setuptools">setuptools</a>
180           package is required to build and run PyLucene on Python 2.3.5. With
181           later versions of Python, setuptools is only required for shared
182           mode. See JCC's <a href="../jcc/documentation/install.html">installation
183           instructions</a> for more information.
184         </p>
185 <a name="N10031"></a><a name="impatient"></a>
186 <h3 class="boxed">For the Impatient Ones</h3>
187 <ol>
188           
189 <li>
190 <span class="codefrag">pushd jcc</span>
191 </li>
192           
193 <li>&lt;edit <span class="codefrag">setup.py</span> to match your environment&gt;</li>
194           
195 <li>
196 <span class="codefrag">python setup.py build</span>
197 </li>
198           
199 <li>
200 <span class="codefrag">sudo python setup.py install</span>
201 </li>
202           
203 <li>
204 <span class="codefrag">popd</span>
205 </li>
206           
207 <li>&lt;edit <span class="codefrag">Makefile</span> to match your environment&gt;</li>
208           
209 <li>
210 <span class="codefrag">make</span>
211 </li>
212           
213 <li>
214 <span class="codefrag">sudo make install</span>
215 </li>
216           
217 <li>
218 <span class="codefrag">make test</span> (look for failures)</li>
219         
220 </ol>
221 <a name="N10064"></a><a name="restofus"></a>
222 <h3 class="boxed">For the Rest of Us</h3>
223 <p>
224           Before building PyLucene, JCC must be
225           built first. See
226           JCC's <a href="../jcc/documentation/install.html">installation
227             instructions</a> for building and installing it.
228         </p>
229 <p>
230           Once JCC is built and installed, PyLucene is built
231           via <span class="codefrag">make</span> which invokes JCC. See PyLucene's
232           <span class="codefrag">Makefile</span> for configuration instructions.
233         </p>
234 <p>
235         There are limits to both how many files can fit on the command
236         line and how large a C++ file the C++ compiler can handle.
237         By default, JCC generates one large C++ file containing the source
238         code for all wrapper classes.
239       </p>
240 <p>
241         Using the --files command line argument, this behaviour can be
242         tuned to workaround various limits, for example:
243       </p>
244 <ul>
245         
246 <li>
247           to break up the large wrapper class file into about 2 files:<br>
248           
249 <span class="codefrag">--files 2</span>
250         
251 </li>
252         
253 <li>
254           to break up the large wrapper class file into about 10 files:<br>
255           
256 <span class="codefrag">--files 10</span>
257         
258 </li>
259         
260 <li>
261           to generate one C++ file per Java class wrapped:<br>
262           
263 <span class="codefrag">--files separate</span>
264         
265 </li>
266       
267 </ul>
268 </div>
269     
270 <a name="N1009D"></a><a name="solaris"></a>
271 <h2 class="boxed">Notes for Solaris</h2>
272 <div class="section">
273 <p>
274         PyLucene's Makefile is a GNU Makefile. Be sure to
275         use <span class="codefrag">gmake</span> instead of plain <span class="codefrag">make</span>.
276       </p>
277 <p>
278         Just as when building JCC, Python's distutils must be nudged a bit to
279         invoke the correct compiler. Sun Studio's C compiler is
280         called <span class="codefrag">cc</span> while its C++ compiler is
281         called <span class="codefrag">CC</span>.<br>
282       
283 </p>
284 <p>
285         To build PyLucene, use the following shell command to ensure that 
286         the C++ compiler is used:<br>
287         
288 <span class="codefrag">
289           $ CC=CC gmake
290         </span>
291       
292 </p>
293 </div>
294   
295 </div>
296 <!--+
297     |end content
298     +-->
299 <div class="clearboth">&nbsp;</div>
300 </div>
301 <div id="footer">
302 <!--+
303     |start bottomstrip
304     +-->
305 <div class="lastmodified">
306 <script type="text/javascript"><!--
307 document.write("Last Published: " + document.lastModified);
308 //  --></script>
309 </div>
310 <div class="copyright">
311         Copyright &copy;
312          2009-2011 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
313 </div>
314 <!--+
315     |end bottomstrip
316     +-->
317 </div>
318 </body>
319 </html>