lucene-pylucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r1531420 - in /lucene/pylucene/trunk/jcc: CHANGES setup.py
Date Fri, 11 Oct 2013 21:11:01 GMT
Author: vajda
Date: Fri Oct 11 21:11:00 2013
New Revision: 1531420

URL: http://svn.apache.org/r1531420
Log:
added support for building with setuptools 1.1.6

Modified:
    lucene/pylucene/trunk/jcc/CHANGES
    lucene/pylucene/trunk/jcc/setup.py

Modified: lucene/pylucene/trunk/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/CHANGES?rev=1531420&r1=1531419&r2=1531420&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/CHANGES (original)
+++ lucene/pylucene/trunk/jcc/CHANGES Fri Oct 11 21:11:00 2013
@@ -1,6 +1,7 @@
 Version 2.17 ->
 --------------------
  - fixed bug PYLUCENE-26 (Martin Anon)
+ - added support for building setuptools >= 1.1.6
  - 
 
 Version 2.16 -> 2.17

Modified: lucene/pylucene/trunk/jcc/setup.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/setup.py?rev=1531420&r1=1531419&r2=1531420&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/setup.py (original)
+++ lucene/pylucene/trunk/jcc/setup.py Fri Oct 11 21:11:00 2013
@@ -193,13 +193,34 @@ try:
 
     enable_shared = False
     with_setuptools_c7 = ('00000000', '00000006', '*c', '00000007', '*final')
+    with_setuptools_116 = ('00000001', '00000001', '00000006', '*final')
 
     if with_setuptools >= with_setuptools_c7 and 'NO_SHARED' not in os.environ:
-        if platform in ('darwin', 'ipod', 'win32'):
+        if platform in ('ipod', 'win32'):
             enable_shared = True
+            from setuptools import Library
+
+        elif platform == 'darwin':
+            enable_shared = True
+            if with_setuptools >= with_setuptools_116:
+                # fix Library building by monkey-patching in expected
+                # _config_vars into build_ext otherwise build_ext is using
+                # sysconfig's instead, wrongly.
+                from setuptools.command import build_ext
+                from distutils.sysconfig import get_config_var
+                get_config_var("LDSHARED")
+                from distutils.sysconfig import _config_vars
+                build_ext._CONFIG_VARS = _config_vars
+                from setuptools.extension import Library
+            else:
+                from setuptools import Library
+
         elif platform == 'linux2':
             from helpers.linux import patch_setuptools
             enable_shared = patch_setuptools(with_setuptools)
+            if enabled_shared:
+                from setuptools import Library
+
         elif platform == 'mingw32':
             enable_shared = True
             # need to monkeypatch the CygwinCCompiler class to generate
@@ -207,6 +228,7 @@ try:
             from helpers.mingw32 import JCCMinGW32CCompiler
             import distutils.cygwinccompiler
             distutils.cygwinccompiler.Mingw32CCompiler = JCCMinGW32CCompiler
+            from setuptools import Library
 
 except ImportError:
     if sys.version_info < (2, 4):
@@ -303,7 +325,6 @@ def main(debug):
 
     if with_setuptools and enable_shared:
         from subprocess import Popen, PIPE
-        from setuptools import Library
 
         kwds = { "extra_compile_args": cflags,
                  "include_dirs": includes,



Mime
View raw message