349 | | '''DONE :)''' |
| 349 | '''DONE :)'''[[BR]][[BR]] |
| 350 | |
| 351 | * Apache Ant |
| 352 | |
| 353 | -> Download the source from: http://ant.apache.org/bindownload.cgi |
| 354 | [[BR]] |
| 355 | Uncompress the downloaded file into a directory.[[BR]] |
| 356 | Set ANT_HOME to the directory you uncompressed Ant to.[[BR]] |
| 357 | Add ${ANT_HOME}/bin (Unix) to your PATH by:[[BR]] |
| 358 | $ export PATH=${PATH}:${ANT_HOME}/bin |
| 359 | [[BR]] |
| 360 | From the ANT_HOME directory run:[[BR]] |
| 361 | $ ant -f fetch.xml -Ddest=system [[BR]] |
| 362 | to get the library dependencies of most of the Ant tasks that require them.[[BR]] |
| 363 | |
| 364 | After successfully installing these pre-requisites, now:[[BR]] |
| 365 | $ cd ./pylucene-x.x.x/ |
| 366 | [[BR]] |
| 367 | $ cd jcc |
| 368 | [[BR]] |
| 369 | $ <edit setup.py to match your environment>[[BR]] |
| 370 | Open setup.py, and search for “JDK”. Update the JDK path to what you found in step 3.[[BR]] |
| 371 | |
| 372 | 51 JDK = {[[BR]] |
| 373 | 52 'darwin': JAVAHOME,[[BR]] |
| 374 | 53 'ipod': '/usr/include/gcc',[[BR]] |
| 375 | 54 #'linux2': '/usr/lib/jvm/java-6-kopenjd',[[BR]] |
| 376 | 55 'linux2': '/usr/lib/jvm/java-6-sun',[[BR]] |
| 377 | 56 'sunos5': '/usr/jdk/instances/jdk1.6.0',[[BR]] |
| 378 | 57 'win32': JAVAHOME,[[BR]] |
| 379 | 58 'mingw32': JAVAHOME,[[BR]] |
| 380 | 59 'freebsd7': '/usr/local/diablo-jdk1.6.0'[[BR]] |
| 381 | 60 }[[BR]] |
| 382 | |
| 383 | |
| 384 | Run:[[BR]] |
| 385 | $ python setup.py build[[BR]] |
| 386 | $ sudo python setup.py install[[BR]] |
| 387 | $ cd ..[[BR]] |
| 388 | [[BR]] |
| 389 | <edit Makefile to match your environment>[[BR]] |
| 390 | $ vim Makefile[[BR]] |
| 391 | Uncomment the following:[[BR]] |
| 392 | 90 # Linux (Ubuntu 11.10 64-bit, Python 2.7.2, OpenJDK 1.7, setuptools 0.6.16)[[BR]] |
| 393 | 91 # Be sure to also set JDK['linux2'] in jcc's setup.py to the JAVA_HOME value[[BR]] |
| 394 | 92 # used below for ANT (and rebuild jcc after changing it).[[BR]] |
| 395 | 93 PREFIX_PYTHON=/usr[[BR]] |
| 396 | 94 ANT=JAVA_HOME=/usr/lib/jvm/java-6-sun /home/user/apache-ant-1.9.1/bin/ant[[BR]] |
| 397 | 95 PYTHON=$(PREFIX_PYTHON)/bin/python[[BR]] |
| 398 | 96 JCC=$(PYTHON) -m jcc --shared --arch x86_64[[BR]] |
| 399 | 97 NUM_FILES=200[[BR]] |
| 400 | |
| 401 | And make the following chances by looking at the above code. |
| 402 | [[BR]] |
| 403 | Now, run: [[BR]] |
| 404 | $ make[[BR]] |
| 405 | This ‘make’ is very very slow.. On my dual core laptop, it took about 15 minutes to complete.[[BR]] |
| 406 | |
| 407 | $ sudo make install[[BR]] |
| 408 | $ make test (look for failures) [[BR]] |
| 409 | [[BR]] |
| 410 | '''Successfully Installed PyLucene, Hurray!! :D'''[[BR]] |
| 411 | |
| 412 | |
| 413 | |
| 414 | |
| 415 | |
| 416 | |
| 417 | |
| 418 | |
| 419 | Links: http://ant.apache.org/manual/install.html[[BR]] |
| 420 | |