You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by "Michael McCandless (Updated) (JIRA)" <ji...@apache.org> on 2011/11/26 12:47:39 UTC

[jira] [Updated] (PYLUCENE-14) Add PythonIndexDeletionPolicy so we can implement IndexDeletionPolicy in Python

     [ https://issues.apache.org/jira/browse/PYLUCENE-14?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated PYLUCENE-14:
---------------------------------------

    Attachment: PYLUCENE-14.patch

Straightforward patch w/ test case...
                
> Add  PythonIndexDeletionPolicy so we can implement IndexDeletionPolicy in Python
> --------------------------------------------------------------------------------
>
>                 Key: PYLUCENE-14
>                 URL: https://issues.apache.org/jira/browse/PYLUCENE-14
>             Project: PyLucene
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>         Attachments: PYLUCENE-14.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

PyLucene 3.4.0 doesn't build on OS X 10.5 with Python 2.5

Posted by Bill Janssen <ja...@parc.com>.
This is OS X Leopard with (32-bit) Python 2.5 and (32-bit) Java 1.5:

[...]
g++ -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc build/temp.macosx-10.5-i386-2.5/build/_lucene/__init__.o build/temp.macosx-10.5-i386-2.5/build/_lucene/__wrap01__.o build/temp.macosx-10.5-i386-2.5/build/_lucene/__wrap02__.o build/temp.macosx-10.5-i386-2.5/build/_lucene/__wrap03__.o build/temp.macosx-10.5-i386-2.5/build/_lucene/__wrap04__.o build/temp.macosx-10.5-i386-2.5/build/_lucene/functions.o build/temp.macosx-10.5-i386-2.5/build/_lucene/JArray.o build/temp.macosx-10.5-i386-2.5/build/_lucene/JObject.o build/temp.macosx-10.5-i386-2.5/build/_lucene/lucene.o build/temp.macosx-10.5-i386-2.5/build/_lucene/types.o -L/Library/Python/2.5/site-packages/JCC-2.11-py2.5-macosx-10.5-i386.egg -ljcc -o build/lib.macosx-10.5-i386-2.5/lucene/_lucene.so -framework JavaVM -Wl,-S -Wl,-rpath /Library/Python/2.5/site-packages/JCC-2.11-py2.5-macosx-10.5-i386.egg
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/runpy.py", line 95, in run_module
    filename, loader, alter_sys)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/runpy.py", line 52, in _run_module_code
    mod_name, mod_fname, mod_loader)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/runpy.py", line 32, in _run_code
    exec code in run_globals
  File "/Library/Python/2.5/site-packages/JCC-2.11-py2.5-macosx-10.5-i386.egg/jcc/__init__.py", line 37, in <module>
    _jcc.CLASSPATH = CLASSPATH
NameError: name '_jcc' is not defined
make: *** [compile] Error 255


The problem is evident if you look in jcc/__init__.py: I don't see any
way "_jcc" is bound if this module is invoked as "python -m jcc".  The
workaround is simple: instead of using the command line documented in
the Makefile for OS X 10.5 and Python 2.5, "JCC=$(PYTHON) -m jcc
--shared", use the same command you'd use for Python 2.6: "JCC=$(PYTHON)
-m jcc.__main__ --shared".

I'd recommend changing that line in the Makefile.

Bill