You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-commits@lucene.apache.org by va...@apache.org on 2013/10/14 04:48:27 UTC

svn commit: r1531778 - in /lucene/pylucene/branches/pylucene_4_5/jcc: ./ CHANGES setup.py

Author: vajda
Date: Mon Oct 14 02:48:27 2013
New Revision: 1531778

URL: http://svn.apache.org/r1531778
Log:
version 2.18

Modified:
    lucene/pylucene/branches/pylucene_4_5/jcc/   (props changed)
    lucene/pylucene/branches/pylucene_4_5/jcc/CHANGES
    lucene/pylucene/branches/pylucene_4_5/jcc/setup.py   (contents, props changed)

Propchange: lucene/pylucene/branches/pylucene_4_5/jcc/
------------------------------------------------------------------------------
  Merged /lucene/pylucene/trunk/jcc:r1529353-1531776

Modified: lucene/pylucene/branches/pylucene_4_5/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_4_5/jcc/CHANGES?rev=1531778&r1=1531777&r2=1531778&view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_4_5/jcc/CHANGES (original)
+++ lucene/pylucene/branches/pylucene_4_5/jcc/CHANGES Mon Oct 14 02:48:27 2013
@@ -1,7 +1,7 @@
-Version 2.17 ->
+Version 2.17 -> 2.18
 --------------------
  - fixed bug PYLUCENE-26 (Martin Anon)
- - 
+ - added support for building with setuptools >= 1.1.6
 
 Version 2.16 -> 2.17
 --------------------

Modified: lucene/pylucene/branches/pylucene_4_5/jcc/setup.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_4_5/jcc/setup.py?rev=1531778&r1=1531777&r2=1531778&view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_4_5/jcc/setup.py (original)
+++ lucene/pylucene/branches/pylucene_4_5/jcc/setup.py Mon Oct 14 02:48:27 2013
@@ -12,7 +12,7 @@
 
 import os, sys, platform, subprocess
 
-jcc_ver = '2.17'
+jcc_ver = '2.18'
 machine = platform.machine()
 
 if machine.startswith("iPod") or machine.startswith("iPhone"):
@@ -193,13 +193,28 @@ 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
+
+        elif platform == 'darwin':
+            enable_shared = True
+            if with_setuptools >= with_setuptools_116:
+                # fix Library building by monkey-patching 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")  # ensure _config_vars is initialized
+                from distutils.sysconfig import _config_vars
+                build_ext._CONFIG_VARS = _config_vars
+
         elif platform == 'linux2':
             from helpers.linux import patch_setuptools
             enable_shared = patch_setuptools(with_setuptools)
+
         elif platform == 'mingw32':
             enable_shared = True
             # need to monkeypatch the CygwinCCompiler class to generate
@@ -208,6 +223,12 @@ try:
             import distutils.cygwinccompiler
             distutils.cygwinccompiler.Mingw32CCompiler = JCCMinGW32CCompiler
 
+        if enable_shared:
+            if with_setuptools >= with_setuptools_116:
+                from setuptools.extension import Library
+            else:
+                from setuptools import Library
+
 except ImportError:
     if sys.version_info < (2, 4):
         raise ImportError, 'setuptools is required when using Python 2.3'
@@ -303,7 +324,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,

Propchange: lucene/pylucene/branches/pylucene_4_5/jcc/setup.py
------------------------------------------------------------------------------
  Merged /lucene/pylucene/trunk/jcc/setup.py:r1529353-1531776