lucene-pylucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r1759084 - in /lucene/pylucene/trunk: Makefile jcc/helpers/linux.py jcc/setup.py
Date Sat, 03 Sep 2016 12:23:05 GMT
Author: vajda
Date: Sat Sep  3 12:23:04 2016
New Revision: 1759084

URL: http://svn.apache.org/viewvc?rev=1759084&view=rev
Log:
PyLucene builds and run on Linux, tests pass

Modified:
    lucene/pylucene/trunk/Makefile
    lucene/pylucene/trunk/jcc/helpers/linux.py
    lucene/pylucene/trunk/jcc/setup.py

Modified: lucene/pylucene/trunk/Makefile
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/Makefile?rev=1759084&r1=1759083&r2=1759084&view=diff
==============================================================================
--- lucene/pylucene/trunk/Makefile (original)
+++ lucene/pylucene/trunk/Makefile Sat Sep  3 12:23:04 2016
@@ -45,33 +45,12 @@ LUCENE=$(LUCENE_SRC)/lucene
 #
 
 # Mac OS X 10.9 (64-bit Python 2.7, Java 1.8)
-PREFIX_PYTHON=/Users/vajda/apache/pylucene/_install
-ANT=/Users/vajda/tmp/apache-ant-1.9.3/bin/ant
-PYTHON=$(PREFIX_PYTHON)/bin/python
-JCC=$(PYTHON) -m jcc.__main__ --shared --arch x86_64
-NUM_FILES=8
-
-# Mac OS X 10.6 (64-bit Python 2.6, Java 1.6)
-#PREFIX_PYTHON=/usr
-#ANT=ant
+#PREFIX_PYTHON=/Users/vajda/apache/pylucene/_install
+#ANT=/Users/vajda/tmp/apache-ant-1.9.3/bin/ant
 #PYTHON=$(PREFIX_PYTHON)/bin/python
 #JCC=$(PYTHON) -m jcc.__main__ --shared --arch x86_64
 #NUM_FILES=8
 
-# Mac OS X 10.6 (MacPorts 1.8.0 64-bit Python 2.7, Java 1.6)
-#PREFIX_PYTHON=/opt/local
-#ANT=ant
-#PYTHON=$(PREFIX_PYTHON)/bin/python
-#JCC=$(PYTHON) -m jcc --shared --arch x86_64
-#NUM_FILES=8
-
-# Mac OS X 10.6 (64-bit and 32-bit Python 2.6 together, Java 1.6)
-#PREFIX_PYTHON=/usr
-#ANT=ant
-#PYTHON=$(PREFIX_PYTHON)/bin/python
-#JCC=$(PYTHON) -m jcc.__main__ --shared --arch x86_64 --arch i386
-#NUM_FILES=8
-
 # Mac OS X 10.5 (32-bit Python 2.5, Java 1.5)
 #PREFIX_PYTHON=/usr
 #ANT=ant
@@ -86,28 +65,14 @@ NUM_FILES=8
 #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=8
 
-# 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.3-py2.3-macosx-10.4-ppc.egg/jcc/__init__.py
-#NUM_FILES=8
-
-# Linux     (Ubuntu 11.10 64-bit, Python 2.7.2, OpenJDK 1.7, setuptools 0.6.16)
+# Linux     (Debian Jessie 64-bit, Python 2.7.9, Oracle Java 1.8
 # Be sure to also set JDK['linux2'] in jcc's setup.py to the JAVA_HOME value
 # used below for ANT (and rebuild jcc after changing it).
-#PREFIX_PYTHON=/usr
-#ANT=JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 /usr/bin/ant
-#PYTHON=$(PREFIX_PYTHON)/bin/python
-#JCC=$(PYTHON) -m jcc --shared
-#NUM_FILES=8
-
-# Linux     (Ubuntu 8.10 64-bit, Python 2.5.2, OpenJDK 1.6, setuptools 0.6c9)
-#PREFIX_PYTHON=/usr
-#ANT=ant
-#PYTHON=$(PREFIX_PYTHON)/bin/python
-#JCC=$(PYTHON) -m jcc --shared
-#NUM_FILES=8
+PREFIX_PYTHON=/opt/apache/pylucene/_install
+ANT=JAVA_HOME=/usr/lib/jvm/java-8-oracle /usr/bin/ant
+PYTHON=$(PREFIX_PYTHON)/bin/python
+JCC=$(PYTHON) -m jcc --shared
+NUM_FILES=8
 
 # Linux     (Ubuntu 6.06, Python 2.4, Java 1.5, no setuptools)
 #PREFIX_PYTHON=/usr

Modified: lucene/pylucene/trunk/jcc/helpers/linux.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/helpers/linux.py?rev=1759084&r1=1759083&r2=1759084&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/helpers/linux.py (original)
+++ lucene/pylucene/trunk/jcc/helpers/linux.py Sat Sep  3 12:23:04 2016
@@ -51,52 +51,27 @@ See %s/INSTALL for more information abou
 
 def patch_setuptools(with_setuptools):
 
-    with_setuptools_c7 = ('00000000', '00000006', '*c', '00000007', '*final')
-    with_setuptools_c11 = ('00000000', '00000006', '*c', '00000011', '*final')
-    with_distribute_1 = ('00000000', '00000006', '00000001', '*final')
-
     try:
         from setuptools.command.build_ext import sh_link_shared_object
         enable_shared = True  # jcc/patches/patch.43 was applied
     except ImportError:
         jccdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
         st_egg = os.path.dirname(setuptools.__path__[0])
-        if with_setuptools_c7 <= with_setuptools <= with_setuptools_c11 or with_distribute_1
<= with_setuptools:
-            # Old setuptools 0.6c7-10 series
-            # New distribute 0.6.1+ series
-            
-            if with_setuptools < with_setuptools_c11 and not hasattr(dist, 'check_packages'):
-                # Old setuptools 0.6c7-10 series missing check_packages()
-                dist.check_packages = check_packages
             
-            setuptools.Library = LinuxLibrary
-            extension.Library = LinuxLibrary
-            build_ext.build_ext = LinuxBuildExt
-            if build_ext.use_stubs:
-                # Build shared libraries.
-                global sh_link_shared_object # Fix UnboundLocalError
-                build_ext.link_shared_object = sh_link_shared_object
-            else:
-                # Build static libraries every where else (unless forced)
-                build_ext.libtype = 'static'
-                build_ext.link_shared_object = st_link_shared_object
-                
-            print >>sys.stderr, "Applied shared mode monkey patch to:", setuptools
-            return True # monkey patch was applied
-                                        
-        elif with_setuptools < with_setuptools_c11:   # old 0.6c7-10 series
-            patch_version = '0.6c7'
-        elif with_setuptools >= with_distribute_1:    # new 0.6.1 and up fork
-            patch_version = '0.6c7'                   # compatible with 0.6c7
+        setuptools.Library = LinuxLibrary
+        extension.Library = LinuxLibrary
+        build_ext.build_ext = LinuxBuildExt
+        if build_ext.use_stubs:
+            # Build shared libraries.
+            global sh_link_shared_object # Fix UnboundLocalError
+            build_ext.link_shared_object = sh_link_shared_object
         else:
-            patch_version = '0.6c11'                  # old 0.6c11+ series
-
-        if os.path.isdir(st_egg):
-            raise NotImplementedError, patch_st_dir(patch_version, st_egg,
-                                                    jccdir)
-        else:
-            raise NotImplementedError, patch_st_zip(patch_version, st_egg,
-                                                    jccdir)
+            # Build static libraries every where else (unless forced)
+            build_ext.libtype = 'static'
+            build_ext.link_shared_object = st_link_shared_object
+                
+        print >>sys.stderr, "Applied shared mode monkey patch to:", setuptools
+        return True # monkey patch was applied
 
     return enable_shared
 
@@ -156,11 +131,3 @@ def st_link_shared_object(self, objects,
         basename = basename[3:]
 
     self.create_static_lib(objects, basename, output_dir, debug, target_lang)
-
-def check_packages(dist, attr, value):
-    for pkgname in value:
-        if not re.match(r'\w+(\.\w+)*', pkgname):
-            distutils.log.warn(
-                "WARNING: %r not a valid package name; please use only"
-                ".-separated package names in setup.py", pkgname
-            )

Modified: lucene/pylucene/trunk/jcc/setup.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/setup.py?rev=1759084&r1=1759083&r2=1759084&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/setup.py (original)
+++ lucene/pylucene/trunk/jcc/setup.py Sat Sep  3 12:23:04 2016
@@ -54,7 +54,7 @@ else:
 JDK = {
     'darwin': JAVAHOME or JAVAFRAMEWORKS,
     'ipod': '/usr/include/gcc',
-    'linux2': '/usr/lib/jvm/java-7-openjdk-amd64',
+    'linux2': '/usr/lib/jvm/java-8-oracle',
     'sunos5': '/usr/jdk/instances/jdk1.6.0',
     'win32': JAVAHOME,
     'mingw32': JAVAHOME,



Mime
View raw message