1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
   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="../">
 
  16 <body onload="init()">
 
  17 <script type="text/javascript">ndeSetTextSize();</script>
 
  22 <div class="breadtrail">
 
  23 <a href="http://www.apache.org/">apache</a> > <a href="http://lucene.apache.org/">lucene</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
 
  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>
 
  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>
 
  52 <a class="selected" href="../index.html">PyLucene</a>
 
  55 <a class="unselected" href="../jcc/index.html">JCC</a>
 
  64 <div id="publishedStrip">
 
  68 <div id="level2tabs"></div>
 
  72 <script type="text/javascript"><!--
 
  73 document.write("Last Published: " + document.lastModified);
 
  79 <div class="breadtrail">
 
  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>
 
  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>
 
 101 <div class="menuitem">
 
 102 <a href="../documentation/readme.html">Features</a>
 
 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>
 
 110 <div class="menuitem">
 
 111 <a href="../resources/version_control.html">Source Code</a>
 
 113 <div class="menuitem">
 
 114 <a href="../resources/mailing_lists.html">Mailing Lists</a>
 
 116 <div class="menuitem">
 
 117 <a href="http://issues.apache.org/jira/browse/PyLucene">Issue Tracking</a>
 
 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>
 
 126 <div id="credit2"></div>
 
 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>
 
 139 <h1>Installing PyLucene</h1>
 
 140 <div id="minitoc-area">
 
 143 <a href="#building">Building PyLucene</a>
 
 146 <a href="#requirements">Requirements</a>
 
 149 <a href="#impatient">For the Impatient Ones</a>
 
 152 <a href="#restofus">For the Rest of Us</a>
 
 157 <a href="#solaris">Notes for Solaris</a>
 
 162 <a name="N1000D"></a><a name="building"></a>
 
 163 <h2 class="boxed">Building PyLucene</h2>
 
 164 <div class="section">
 
 166         PyLucene is completely code-generated by JCC whose sources are
 
 167         included with the PyLucene sources.<br>
 
 170 <a name="N10018"></a><a name="requirements"></a>
 
 171 <h3 class="boxed">Requirements</h3>
 
 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
 
 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.
 
 185 <a name="N10031"></a><a name="impatient"></a>
 
 186 <h3 class="boxed">For the Impatient Ones</h3>
 
 190 <span class="codefrag">pushd jcc</span>
 
 193 <li><edit <span class="codefrag">setup.py</span> to match your environment></li>
 
 196 <span class="codefrag">python setup.py build</span>
 
 200 <span class="codefrag">sudo python setup.py install</span>
 
 204 <span class="codefrag">popd</span>
 
 207 <li><edit <span class="codefrag">Makefile</span> to match your environment></li>
 
 210 <span class="codefrag">make</span>
 
 214 <span class="codefrag">sudo make install</span>
 
 218 <span class="codefrag">make test</span> (look for failures)</li>
 
 221 <a name="N10064"></a><a name="restofus"></a>
 
 222 <h3 class="boxed">For the Rest of Us</h3>
 
 224           Before building PyLucene, JCC must be
 
 226           JCC's <a href="../jcc/documentation/install.html">installation
 
 227             instructions</a> for building and installing it.
 
 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.
 
 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.
 
 241         Using the --files command line argument, this behaviour can be
 
 242         tuned to workaround various limits, for example:
 
 247           to break up the large wrapper class file into about 2 files:<br>
 
 249 <span class="codefrag">--files 2</span>
 
 254           to break up the large wrapper class file into about 10 files:<br>
 
 256 <span class="codefrag">--files 10</span>
 
 261           to generate one C++ file per Java class wrapped:<br>
 
 263 <span class="codefrag">--files separate</span>
 
 270 <a name="N1009D"></a><a name="solaris"></a>
 
 271 <h2 class="boxed">Notes for Solaris</h2>
 
 272 <div class="section">
 
 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>.
 
 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>
 
 285         To build PyLucene, use the following shell command to ensure that 
 
 286         the C++ compiler is used:<br>
 
 288 <span class="codefrag">
 
 299 <div class="clearboth"> </div>
 
 305 <div class="lastmodified">
 
 306 <script type="text/javascript"><!--
 
 307 document.write("Last Published: " + document.lastModified);
 
 310 <div class="copyright">
 
 312          2009-2011 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>