On 2020/04/14 17:59, Branko Čibej wrote:
> On 14.04.2020 10:26, Stefan Sperling wrote:
>> On Tue, Apr 14, 2020 at 08:50:03AM +0200, Branko Čibej wrote:
>>> On 08.04.2020 12:18, Stefan Sperling wrote:
>>>> Everyone, thanks for all the contributions you have made for -rc2!
>>>>
>>>> The 1.14.0-rc2 release artifacts are now available for testing/signing.
>>>> Please get the tarballs from
>>>>   https://dist.apache.org/repos/dist/dev/subversion
>>>> and add your signatures there.
>>>>
>>>> If everything goes well we can rebrand this release candidate as
>>>> the actual 1.14.0 release with minimal effort.
>>>>
>>>> The prospected 1.14.0 release date is May 6.
>>>
>>> Configure on OSX throws warnings about missing Swig for Python bindings.
>>> This is a regression. Swig should not be needed for release builds.
>> It's unclear from your message whether you consider this a release blocker.
> 
> It's not a blocker. The swig-py build works fine and doesn't try to
> invoke Swig, but configure shouldn't warn, especially when
> --without-swig is passed explicitly. It doesn't for Ruby and Perl.

I agree that if --without-swig is passwed to configure, it shouldn't
check SWIG version for SWIG Python bindings even if the user want
to build Python bindings. Configure script also check SWIG version
for Ruby bindings. But its check concerns that SWIG_VERSION is empty,
so it's no problem.

The patch attached address only for the case --without-swig.

However I also want to fix still existiong problems below:

* When environment variable PYTHON is set for make check, configure also
 treat it as a target of Python bindings, regardlessly the user really
 want to build Python bindings or not. It is also check if py3c.h
 is available.

* If SWIG generated Python bindings source files already exist on
 configure and its target Python version is different from the target
 provided for configure, force to regenerate bindings source files.

Cheers,
-- 
Yasuhito FUTATSUKI <futat...@yf.bsdclub.org>/<futat...@poem.co.jp>
Avoid check for SWIG version for Python bindings when --witout-swig is passed.

* build/ac-macros/swig.m4 (SVN_FIND_SWIG):

Found by: brane
Index: build/ac-macros/swig.m4
===================================================================
--- build/ac-macros/swig.m4	(revision 1876517)
+++ build/ac-macros/swig.m4	(working copy)
@@ -151,38 +151,44 @@
           ])
           SWIG_PY_LIBS="`SVN_REMOVE_STANDARD_LIB_DIRS($ac_cv_python_libs)`"
 
-          AC_CACHE_CHECK([for Python >= 3], [ac_cv_python_is_py3],[
-            ac_cv_python_is_py3="no"
-            $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \
-               ac_cv_python_is_py3="yes"
-          ])
-
-          if test "$ac_cv_python_is_py3" = "yes"; then
-            if test "$SWIG_VERSION" -ge "300010"; then
-              dnl SWIG Python bindings successfully configured, clear the error message dnl
-              SWIG_PY_ERRMSG=""
-            else
-              SWIG_PY_ERRMSG="SWIG version is not suitable"
-              AC_MSG_WARN([Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer])
-            fi
-            if test "$SWIG_VERSION" -lt "400000"; then
-              SWIG_PY_OPTS="-python -py3 -nofastunpack -modern"
-            else
-              SWIG_PY_OPTS="-python -py3 -nofastunpack"
-            fi
+          if test "$SWIG" = "none"; then
+            SWIG_PY_ERRMSG=""
           else
-            if test "$SWIG_VERSION" -lt "400000"; then
-              SWIG_PY_OPTS="-python -classic"
-              dnl SWIG Python bindings successfully configured, clear the error message dnl
-              SWIG_PY_ERRMSG=""
+            # Farther version check for SWIG and Python, to determine   
+            # SWIG_PY_OPTS. We can skip this if we have already
+            # SWIG generated files.
+            AC_CACHE_CHECK([for Python >= 3], [ac_cv_python_is_py3],[
+              ac_cv_python_is_py3="no"
+              $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \
+                 ac_cv_python_is_py3="yes"
+            ])
+  
+            if test "$ac_cv_python_is_py3" = "yes"; then
+              if test "$SWIG_VERSION" -ge "300010"; then
+                dnl SWIG Python bindings successfully configured, clear the error message dnl
+                SWIG_PY_ERRMSG=""
+              else
+                SWIG_PY_ERRMSG="SWIG version is not suitable"
+                AC_MSG_WARN([Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer])
+              fi
+              if test "$SWIG_VERSION" -lt "400000"; then
+                SWIG_PY_OPTS="-python -py3 -nofastunpack -modern"
+              else
+                SWIG_PY_OPTS="-python -py3 -nofastunpack"
+              fi
             else
-              SWIG_PY_OPTS="-python -nofastunpack"
-              SWIG_PY_ERRMSG="SWIG version is not suitable"
-              AC_MSG_WARN([Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0])
+              if test "$SWIG_VERSION" -lt "400000"; then
+                SWIG_PY_OPTS="-python -classic"
+                dnl SWIG Python bindings successfully configured, clear the error message dnl
+                SWIG_PY_ERRMSG=""
+              else
+                SWIG_PY_OPTS="-python -nofastunpack"
+                SWIG_PY_ERRMSG="SWIG version is not suitable"
+                AC_MSG_WARN([Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0])
+              fi
             fi
           fi
         fi
-            
       fi
     fi
 

Reply via email to