You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by va...@apache.org on 2009/05/16 23:23:33 UTC

svn commit: r775533 - in /lucene/pylucene/branches/pylucene_2_4: ./ jcc/ jcc/jcc/ jcc/jcc/sources/

Author: vajda
Date: Sat May 16 21:23:32 2009
New Revision: 775533

URL: http://svn.apache.org/viewvc?rev=775533&view=rev
Log:
merged trunk HEAD into pylucene_2_4 branch

Added:
    lucene/pylucene/branches/pylucene_2_4/extensions.xml
      - copied unchanged from r775531, lucene/pylucene/trunk/extensions.xml
Removed:
    lucene/pylucene/branches/pylucene_2_4/build.xml
Modified:
    lucene/pylucene/branches/pylucene_2_4/CHANGES
    lucene/pylucene/branches/pylucene_2_4/Makefile
    lucene/pylucene/branches/pylucene_2_4/jcc/CHANGES
    lucene/pylucene/branches/pylucene_2_4/jcc/jcc/__main__.py
    lucene/pylucene/branches/pylucene_2_4/jcc/jcc/cpp.py
    lucene/pylucene/branches/pylucene_2_4/jcc/jcc/python.py
    lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/functions.cpp
    lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/functions.h
    lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/macros.h
    lucene/pylucene/branches/pylucene_2_4/jcc/setup.py

Modified: lucene/pylucene/branches/pylucene_2_4/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_4/CHANGES?rev=775533&r1=775532&r2=775533&view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_4/CHANGES (original)
+++ lucene/pylucene/branches/pylucene_2_4/CHANGES Sat May 16 21:23:32 2009
@@ -1,4 +1,11 @@
 
+Version 2.4.1 ->
+----------------------
+ - renamed the Highlighter's SpanScorer class to HighlighterSpanScorer
+ - fixed bug in Makefile's test target which tested installed build
+ - PyLucene built with JCC 2.3
+ - 
+
 Version 2.4.0 -> 2.4.1
 ----------------------
  - PyLucene with JCC now a subproject of the Apache Lucene project

Modified: lucene/pylucene/branches/pylucene_2_4/Makefile
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_4/Makefile?rev=775533&r1=775532&r2=775533&view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_4/Makefile (original)
+++ lucene/pylucene/branches/pylucene_2_4/Makefile Sat May 16 21:23:32 2009
@@ -14,7 +14,7 @@
 # site-packages directory.
 #
 
-VERSION=2.4.1-1
+VERSION=2.4.1-2
 LUCENE_SVN_VER=HEAD
 LUCENE_VER=2.4.1
 LUCENE_SVN=http://svn.apache.org/repos/asf/lucene/java/tags/lucene_2_4_1
@@ -30,6 +30,8 @@
 # PREFIX: where programs are normally installed on your system (Unix).
 # PREFIX_PYTHON: where your version of python is installed.
 # JCC: how jcc is invoked, depending on the python version:
+#  - python 2.6:
+#      $(PYTHON) -m jcc.__main__
 #  - python 2.5:
 #      $(PYTHON) -m jcc
 #  - python 2.4:
@@ -46,8 +48,8 @@
 #JCC=$(PYTHON) -m jcc --shared
 #NUM_FILES=2
 
-# Mac OS X  (Python 2.6, Java 1.5)
-#PREFIX_PYTHON=/Users/vajda/tmp/Python-2.6/install
+# Mac OS X  (Python 2.6.2, Java 1.5)
+#PREFIX_PYTHON=/Users/vajda/tmp/Python-2.6.2/install
 #ANT=ant
 #PYTHON=$(PREFIX_PYTHON)/Python.framework/Versions/2.6/bin/python
 #JCC=$(PYTHON) -m jcc.__main__ --shared
@@ -57,14 +59,14 @@
 #PREFIX_PYTHON=/usr
 #ANT=ant
 #PYTHON=$(PREFIX_PYTHON)/bin/python
-#JCC=$(PYTHON) /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/JCC-2.2-py2.3-macosx-10.4-i386.egg/jcc/__init__.py
+#JCC=$(PYTHON) /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/JCC-2.3-py2.3-macosx-10.4-i386.egg/jcc/__init__.py
 #NUM_FILES=2
 
 # Mac OS X  (Python 2.3.5, Java 1.5, setuptools 0.6c7, PPC Mac OS X 10.4)
 #PREFIX_PYTHON=/usr
 #ANT=ant
 #PYTHON=$(PREFIX_PYTHON)/bin/python
-#JCC=$(PYTHON) /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/JCC-2.2-py2.3-macosx-10.4-ppc.egg/jcc/__init__.py
+#JCC=$(PYTHON) /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/JCC-2.3-py2.3-macosx-10.4-ppc.egg/jcc/__init__.py
 #NUM_FILES=2
 
 # Linux     (Ubuntu 6.06, Python 2.4, Java 1.5, no setuptools)
@@ -168,7 +170,7 @@
 	cd $(LUCENE)/contrib/instantiated; $(ANT) -Dversion=$(LUCENE_VER)
 
 $(EXTENSIONS_JAR): $(LUCENE_JAR)
-	$(ANT) -Dlucene.dir=$(LUCENE)
+	$(ANT) -f extensions.xml -Dlucene.dir=$(LUCENE)
 
 JARS=$(LUCENE_JAR) $(SNOWBALL_JAR) $(HIGHLIGHTER_JAR) $(ANALYZERS_JAR) \
      $(REGEX_JAR) $(QUERIES_JAR) $(INSTANTIATED_JAR) $(EXTENSIONS_JAR)
@@ -193,6 +195,7 @@
            --mapping org.apache.lucene.document.Document 'get:(Ljava/lang/String;)Ljava/lang/String;' \
            --mapping java.util.Properties 'getProperty:(Ljava/lang/String;)Ljava/lang/String;' \
            --sequence org.apache.lucene.search.Hits 'length:()I' 'doc:(I)Lorg/apache/lucene/document/Document;' \
+           --rename org.apache.lucene.search.highlight.SpanScorer=HighlighterSpanScorer \
            --version $(LUCENE_VER) \
            --module python/collections.py \
            --files $(NUM_FILES)
@@ -220,12 +223,22 @@
 	rm -rf $(LUCENE)
 
 
+BUILD_TEST:=$(PYLUCENE)/build/test
+
+ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
+BUILD_TEST:=`cygpath -aw $(BUILD_TEST)`
+endif
+
+install-test:
+	mkdir -p $(BUILD_TEST)
+	PYTHONPATH=$(BUILD_TEST) $(GENERATE) --install $(DEBUG_OPT) --install-dir $(BUILD_TEST)
+
 samples/LuceneInAction/index:
-	cd samples/LuceneInAction; $(PYTHON) index.py
+	cd samples/LuceneInAction; PYTHONPATH=$(BUILD_TEST) $(PYTHON) index.py
 
-test: samples/LuceneInAction/index
-	find test -name 'test_*.py' | xargs -t -n 1 $(PYTHON)
-	ls samples/LuceneInAction/*Test.py | xargs -t -n 1 $(PYTHON)
+test: install-test samples/LuceneInAction/index
+	find test -name 'test_*.py' | PYTHONPATH=$(BUILD_TEST) xargs -t -n 1 $(PYTHON)
+	ls samples/LuceneInAction/*Test.py | PYTHONPATH=$(BUILD_TEST) xargs -t -n 1 $(PYTHON)
 
 
 ARCHIVE=pylucene-$(VERSION)-src.tar.gz

Modified: lucene/pylucene/branches/pylucene_2_4/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_4/jcc/CHANGES?rev=775533&r1=775532&r2=775533&view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_4/jcc/CHANGES (original)
+++ lucene/pylucene/branches/pylucene_2_4/jcc/CHANGES Sat May 16 21:23:32 2009
@@ -1,10 +1,14 @@
 
-Version 2.2 ->
+Version 2.2 -> 2.3
 ------------------
  - fixed Solaris compilation issue with using va_arg() with function pointers
  - added --reserved command line arg to extend list of words to mangle
  - fixed bug with initJCC not being run when Python VM embedded in JVM
- - 
+ - added --wininst to enable use of bdist_wininst with distutils (Jonas Maurus)
+ - added --help to describe command line options (Jonas Maurus)
+ - added support for --rename to workaround python flattened namespace clashes
+ - fixed bug with Enumeration/Iterator template function instantiation
+ - removed -framework Python from darwin link flags in setup.py
 
 Version 2.1 -> 2.2
 ------------------

Modified: lucene/pylucene/branches/pylucene_2_4/jcc/jcc/__main__.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_4/jcc/jcc/__main__.py?rev=775533&r1=775532&r2=775533&view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_4/jcc/jcc/__main__.py (original)
+++ lucene/pylucene/branches/pylucene_2_4/jcc/jcc/__main__.py Sat May 16 21:23:32 2009
@@ -1,5 +1,82 @@
 
 import sys
-
 from jcc import cpp
+
+if len(sys.argv) == 1 or '--help' in sys.argv:
+    help = '''
+  JCC - C++/Python Java Native Interface Code Generator
+
+  Usage: python -m jcc.__main__ [options] [actions]
+
+  Input options:
+    --jar JARFILE           - make JCC wrap all public classes found in
+                              JARFILE, add it to the module's CLASSPATH and
+                              include it in the distribution 
+    --include JARFILE       - include JARFILE in the distribution and add
+                              it to the module's CLASSPATH
+    --exclude CLASS         - explicitly don't wrap CLASS
+    --package PACKAGE       - add PACKAGE to the list of packages from
+                              which dependencies are automatically wrapped
+    --classpath [PATH|JAR]  - add [PATH|JAR] to CLASSPATH while generating
+                              wrappers 
+    --module MODULE         - include Python MODULE in the distribution
+    --reserved SYMBOL       - mark SYMBOL as a reserved word that will be
+                              mangled in the generated C++ code to avoid
+                              clashes with C/C++ reserved words or header
+                              file definitions
+
+  Python wrapper generation options:
+    --python NAME           - generate wrappers for use from Python in a module
+                              called NAME
+    --version VERSION       - the generated module's version number
+    --shared                - generate a module that links against a shared
+                              library version of the JCC runtime so that
+                              multiple JCC-wrapped modules can be used within
+                              the same Python runtime
+    --sequence CLASS METHODSIGNATURE
+                            - Generate a pythonic sequence protocol wrapper for
+                              CLASS
+    --mapping CLASS METHODSIGNATURE1 METHODSIGNATURE2
+                            - Generate a pythonic map protocol wrapper for CLASS
+
+    --rename CLASS1=NAME1,CLASS2=NAME2,...
+                            - Rename one or more Python wrapper classes to
+                              avoid name clashes due to the flattening of
+                              the Java package namespaces as mapped into
+                              Python
+
+    If you're planning to use pythonic wrappers you should read the relevant
+    documentation first:
+      http://lucene.apache.org/pylucene/jcc/documentation/readme.html#python
+
+  Output options:
+    --debug                 - generate a module using the C++ compiler's
+                              debug options
+    --output OUTPUTDIR      - the wrapper will be generated in OUTPUTDIR,
+                              'build' by default
+    --files N               - split the generated wrapper file into at least
+                              N files to workaround C++ compiler file size
+                              limitations 
+
+  Actions:
+    --build                 - generate the wrapper and compile it
+    --compile               - recompile the (previously generated) module
+    --install               - install the wrapper in the local site-packages
+
+  Distribution actions:
+    --use-distutils         - use distutils even when setuptools is availble
+    --bdist                 - generate a binary distutils-based distribution
+                              or a setuptools-based .egg
+    --wininst               - create an installer application for Microsoft
+                              Windows
+
+  Other distutils/setuptools options (there are passed right through):
+    --compiler COMPILER     - use COMPILER instead of the platform default
+    --root ROOTDIR
+    --install-dir INSTALLDIR
+    --prefix PREFIX
+'''
+    print help
+    sys.exit(0)
+  
 cpp.jcc(sys.argv)

Modified: lucene/pylucene/branches/pylucene_2_4/jcc/jcc/cpp.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_4/jcc/jcc/cpp.py?rev=775533&r1=775532&r2=775533&view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_4/jcc/jcc/cpp.py (original)
+++ lucene/pylucene/branches/pylucene_2_4/jcc/jcc/cpp.py Sat May 16 21:23:32 2009
@@ -257,6 +257,7 @@
     version = ''
     mappings = {}
     sequences = {}
+    renames = {}
     env = None
     wrapperFiles = 1
     prefix = None
@@ -265,6 +266,7 @@
     use_distutils = False
     shared = False
     dist = False
+    wininst = False
     compiler = None
 
     i = 1
@@ -319,6 +321,10 @@
             elif arg == '--sequence':
                 sequences[args[i + 1]] = (args[i + 2], args[i + 3])
                 i += 3
+            elif arg == '--rename':
+                i += 1
+                renames.update(dict([arg.split('=')
+                                     for arg in args[i].split(',')]))
             elif arg == '--files':
                 i += 1
                 wrapperFiles = args[i]
@@ -340,6 +346,10 @@
             elif arg == '--bdist':
                 from python import compile
                 dist = True
+            elif arg == '--wininst':
+                from python import compile
+                wininst = True
+                dist = True
             elif arg == '--compiler':
                 i += 1
                 compiler = args[i]
@@ -366,7 +376,7 @@
             compile(env, os.path.dirname(args[0]), output, moduleName,
                     install, dist, debug, jars, version,
                     prefix, root, install_dir, use_distutils,
-                    shared, compiler, modules)
+                    shared, compiler, modules, wininst)
     else:
         for className in classNames:
             cls = findClass(className.replace('.', '/'))
@@ -447,6 +457,7 @@
                            constructors, methods, protectedMethods,
                            fields, instanceFields,
                            mappings.get(className), sequences.get(className),
+                           renames.get(className),
                            declares, typeset, excludes, moduleName)
 
                 line(out_h)
@@ -477,7 +488,7 @@
                 compile(env, os.path.dirname(args[0]), output, moduleName,
                         install, dist, debug, jars, version,
                         prefix, root, install_dir, use_distutils,
-                        shared, compiler, modules)
+                        shared, compiler, modules, wininst)
 
 
 def header(env, out, cls, typeset, packages, excludes):

Modified: lucene/pylucene/branches/pylucene_2_4/jcc/jcc/python.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_4/jcc/jcc/python.py?rev=775533&r1=775532&r2=775533&view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_4/jcc/jcc/python.py (original)
+++ lucene/pylucene/branches/pylucene_2_4/jcc/jcc/python.py Sat May 16 21:23:32 2009
@@ -390,7 +390,7 @@
 
 def python(env, out_h, out, cls, superCls, names, superNames,
            constructors, methods, protectedMethods, fields, instanceFields,
-           mapping, sequence, declares, typeset, excludes, moduleName):
+           mapping, sequence, rename, declares, typeset, excludes, moduleName):
 
     line(out_h)
     line(out_h, 0, '#include <Python.h>')
@@ -711,7 +711,7 @@
         if iteratorExt:
             tp_iter = 'get_extension_iterator'
         else:
-            tp_iter = 'get_iterator<t_%s>' %(names[-1])
+            tp_iter = '((PyObject *(*)(t_%s *)) get_iterator<t_%s>)' %(names[-1], names[-1])
         tp_iternext = '0'
     elif nextMethod and iterator.isAssignableFrom(cls):
         tp_iter = 'PyObject_SelfIter'
@@ -720,7 +720,7 @@
         if nextExt:
             tp_iternext = 'get_extension_next'
         else:
-            tp_iternext = '(get_iterator_next<%s%st_%s,%s>)' %(ns, sep, n, returnName)
+            tp_iternext = '((PyObject *(*)(java::util::t_Iterator *)) get_iterator_next<java::util::t_Iterator,%s%st_%s,%s>)' %(ns, sep, n, returnName)
     elif nextElementMethod and enumeration.isAssignableFrom(cls):
         tp_iter = 'PyObject_SelfIter'
         returnName = typename(nextElementMethod.getReturnType(), cls, False)
@@ -728,7 +728,7 @@
         if nextElementExt:
             tp_iternext = 'get_extension_nextElement'
         else:
-            tp_iternext = '(get_enumeration_nextElement<%s%st_%s,%s>)' %(ns, sep, n, returnName)
+            tp_iternext = '((PyObject *(*)(java::util::t_Enumeration *)) get_enumeration_next<java::util::t_Enumeration,%s%st_%s,%s>)' %(ns, sep, n, returnName)
     elif nextMethod:
         tp_iter = 'PyObject_SelfIter'
         returnName = typename(nextMethod.getReturnType(), cls, False)
@@ -736,7 +736,7 @@
         if nextExt:
             tp_iternext = 'get_extension_next'
         else:
-            tp_iternext = '(get_next<t_%s,%s%st_%s,%s>)' %(names[-1], ns, sep, n, returnName)
+            tp_iternext = '((PyObject *(*)(t_%s *)) get_next<t_%s,%s%st_%s,%s>)' %(names[-1], names[-1], ns, sep, n, returnName)
     else:
         tp_iter = '0'
         tp_iternext = '0'
@@ -807,10 +807,8 @@
     line(out)
     line(out, indent, 'void t_%s::install(PyObject *module)', names[-1])
     line(out, indent, '{')
-    if isExtension:
-        line(out, indent + 1, 'INSTALL_EXTENSION(%s, module);', names[-1])
-    else:
-        line(out, indent + 1, 'INSTALL_TYPE(%s, module);', names[-1])
+    line(out, indent + 1, 'installType(&%s$$Type, module, "%s", %d);',
+         names[-1], rename or names[-1], isExtension and 1 or 0)
     for inner in cls.getDeclaredClasses():
         if inner in typeset:
             if Modifier.isStatic(inner.getModifiers()):
@@ -1278,7 +1276,7 @@
 
 def compile(env, jccPath, output, moduleName, install, dist, debug, jars,
             version, prefix, root, install_dir, use_distutils,
-            shared, compiler, modules):
+            shared, compiler, modules, wininst):
 
     try:
         if use_distutils:
@@ -1402,7 +1400,9 @@
         script_args.append('--install-lib=%s' % install_dir)
 
     if dist:
-        if with_setuptools:
+        if wininst:
+            script_args.append('bdist_wininst')
+        elif with_setuptools:
             script_args.append('bdist_egg')
         else:
             script_args.append('bdist')

Modified: lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/functions.cpp
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/functions.cpp?rev=775533&r1=775532&r2=775533&view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/functions.cpp (original)
+++ lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/functions.cpp Sat May 16 21:23:32 2009
@@ -1153,3 +1153,18 @@
 
     return array;
 }
+
+void installType(PyTypeObject *type, PyObject *module, char *name,
+                 int isExtension)
+{
+    if (PyType_Ready(type) == 0)
+    {
+        Py_INCREF(type);
+        if (isExtension)
+        {
+            type->ob_type = &FinalizerClass$$Type;
+            Py_INCREF(&FinalizerClass$$Type);
+        }
+        PyModule_AddObject(module, name, (PyObject *) type);
+    }
+}

Modified: lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/functions.h
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/functions.h?rev=775533&r1=775532&r2=775533&view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/functions.h (original)
+++ lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/functions.h Sat May 16 21:23:32 2009
@@ -93,20 +93,19 @@
 PyObject *callSuper(PyTypeObject *type, PyObject *self,
                     const char *name, PyObject *args, int cardinality);
 
-template<class T> PyObject *get_iterator(PyObject *self)
+template<class T> PyObject *get_iterator(T *self)
 {
     java::util::Iterator iterator((jobject) NULL);
 
-    OBJ_CALL(iterator = (((T *) self)->object.iterator()));
+    OBJ_CALL(iterator = self->object.iterator());
     return java::util::t_Iterator::wrap_Object(iterator);
 }
 
-template<class U, class V> PyObject *get_iterator_next(PyObject *self)
+template<class T, class U, class V> PyObject *get_iterator_next(T *self)
 {
-    java::util::t_Iterator *iterator = (java::util::t_Iterator *) self;
     jboolean hasNext;
 
-    OBJ_CALL(hasNext = iterator->object.hasNext());
+    OBJ_CALL(hasNext = self->object.hasNext());
     if (!hasNext)
     {
         PyErr_SetNone(PyExc_StopIteration);
@@ -114,7 +113,7 @@
     }
 
     V next((jobject) NULL);
-    OBJ_CALL(next = iterator->object.next());
+    OBJ_CALL(next = self->object.next());
 
     jclass cls = java::lang::String::initializeClass();
     if (env->get_vm_env()->IsInstanceOf(next.this$, cls))
@@ -123,12 +122,11 @@
     return U::wrap_Object(next);
 }
 
-template<class U, class V> PyObject *get_enumeration_nextElement(PyObject *self)
+template<class T, class U, class V> PyObject *get_enumeration_next(T *self)
 {
-    java::util::t_Enumeration *enumeration = (java::util::t_Enumeration *) self;
     jboolean hasMoreElements;
 
-    OBJ_CALL(hasMoreElements = enumeration->object.hasMoreElements());
+    OBJ_CALL(hasMoreElements = self->object.hasMoreElements());
     if (!hasMoreElements)
     {
         PyErr_SetNone(PyExc_StopIteration);
@@ -136,7 +134,7 @@
     }
 
     V next((jobject) NULL);
-    OBJ_CALL(next = enumeration->object.nextElement());
+    OBJ_CALL(next = self->object.nextElement());
 
     jclass cls = java::lang::String::initializeClass();
     if (env->get_vm_env()->IsInstanceOf(next.this$, cls))
@@ -145,12 +143,11 @@
     return U::wrap_Object(next);
 }
 
-template<class T, class U, class V> PyObject *get_next(PyObject *self)
+template<class T, class U, class V> PyObject *get_next(T *self)
 {
-    T *iterator = (T *) self;
     V next((jobject) NULL);
 
-    OBJ_CALL(next = iterator->object.next());
+    OBJ_CALL(next = self->object.next());
     if (!next)
     {
         PyErr_SetNone(PyExc_StopIteration);
@@ -171,6 +168,8 @@
 jobjectArray fromPySequence(jclass cls, PyObject *sequence);
 PyObject *castCheck(PyObject *obj, getclassfn initializeClass,
                     int reportError);
+void installType(PyTypeObject *type, PyObject *module, char *name,
+                 int isExtension);
 
 extern PyTypeObject FinalizerClass$$Type;
 extern PyTypeObject FinalizerProxy$$Type;

Modified: lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/macros.h
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/macros.h?rev=775533&r1=775532&r2=775533&view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/macros.h (original)
+++ lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/macros.h Sat May 16 21:23:32 2009
@@ -123,7 +123,6 @@
 }                                                                       \
 
 
-
 #define INSTALL_TYPE(name, module)                                     \
     if (PyType_Ready(&name##$$Type) == 0)                              \
     {                                                                  \
@@ -131,14 +130,6 @@
         PyModule_AddObject(module, #name, (PyObject *) &name##$$Type); \
     }
 
-#define INSTALL_EXTENSION(name, module)                                \
-    if (PyType_Ready(&name##$$Type) == 0)                              \
-    {                                                                  \
-        Py_INCREF(&name##$$Type);                                      \
-        name##$$Type.ob_type = &FinalizerClass$$Type;                  \
-        PyModule_AddObject(module, #name, (PyObject *) &name##$$Type); \
-    }
-
 
 #define Py_RETURN_BOOL(b)                       \
     {                                           \

Modified: lucene/pylucene/branches/pylucene_2_4/jcc/setup.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_4/jcc/setup.py?rev=775533&r1=775532&r2=775533&view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_4/jcc/setup.py (original)
+++ lucene/pylucene/branches/pylucene_2_4/jcc/setup.py Sat May 16 21:23:32 2009
@@ -12,7 +12,7 @@
 
 import os, sys, platform, subprocess
 
-jcc_ver = '2.2'
+jcc_ver = '2.3'
 python_ver = '%d.%d.%d' %(sys.version_info[0:3])
 machine = platform.machine()
 
@@ -74,7 +74,7 @@
 }
 
 LFLAGS = {
-    'darwin': ['-framework', 'JavaVM', '-framework', 'Python'],
+    'darwin': ['-framework', 'JavaVM'],
     'ipod': ['-ljvm', '-lpython%s.%s' %(sys.version_info[0:2]),
              '-L/usr/lib/gcc/arm-apple-darwin9/4.0.1'],
     'linux2/i386': ['-L%(linux2)s/jre/lib/i386' %(JDK), '-ljava',