subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From futat...@apache.org
Subject svn commit: r1877338 - /subversion/trunk/build/generator/gen_win_dependencies.py
Date Mon, 04 May 2020 04:43:37 GMT
Author: futatuki
Date: Mon May  4 04:43:37 2020
New Revision: 1877338

URL: http://svn.apache.org/viewvc?rev=1877338&view=rev
Log:
* build/generator/gen_win_dependencies.py (GenDependenciesBase._find_python):
 Fix differences of SWIG_PY_OPTS between Unix and Windows.
 (Just same logic as function SVN_FIND_SWIG in build/ac-macros/swig.m4)

Patch by: Jun Omae <jun66j5{_AT_}gmail.com>

Modified:
    subversion/trunk/build/generator/gen_win_dependencies.py

Modified: subversion/trunk/build/generator/gen_win_dependencies.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win_dependencies.py?rev=1877338&r1=1877337&r2=1877338&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_win_dependencies.py (original)
+++ subversion/trunk/build/generator/gen_win_dependencies.py Mon May  4 04:43:37 2020
@@ -1038,10 +1038,22 @@ class GenDependenciesBase(gen_base.Gener
       return
 
     if sys.version_info[0] >= 3:
-      self.user_macros.append(UserMacro("SWIG_PY_OPTS", "-python -py3"))
+      if self.swig_version < (3, 0, 10):
+        if show_warnings:
+          print("WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or
newer")
+        return
+      if self.swig_version < (4, 0, 0):
+        opts = "-python -py3 -nofastunpack -modern"
+      else:
+        opts = "-python -py3 -nofastunpack"
     else:
-      self.user_macros.append(UserMacro("SWIG_PY_OPTS", "-python -classic"))
+      if not ((1, 3, 24) <= self.swig_version < (4, 0, 0)):
+        if show_warnings:
+          print("WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG
< 4.0.0")
+        return
+      opts = "-python -classic"
 
+    self.user_macros.append(UserMacro("SWIG_PY_OPTS", opts))
     self._libraries['python'] = SVNCommonLibrary('python', inc_dir, lib_dir, None,
                                                  sys.version.split(' ')[0])
 



Mime
View raw message