[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: configure --without-swig warns when it shouldn't

From: Yasuhito FUTATSUKI <futatuki_at_poem.co.jp>
Date: Sun, 31 May 2020 14:39:56 +0900

On 2020/05/31 12:14, Daniel Shahaf wrote:
> Yasuhito FUTATSUKI wrote on Sat, 30 May 2020 19:24 +0900:
>> On 2020/05/12 23:17, Branko Čibej wrote:
>>> Can we just say that it was a mistake to look at the environment (e.g.,
>>> PERL=none) instead of configure arguments (--without-swig-perl)? I agree
>>> that adding the proposed flags to configure is the correct solution. We
>>> could also add a warning for usage of PERL=none and RUBY=none, pointing
>>> users to the new options instead.
>>
>> Then I make a patch as a starting point. Could anyone please refine
>> or rewrite this?
>
> Thanks for the patch!
>
> I've tested it and confirm it behaves as expected:
>
> % ~/src/svn-config.nice ~/src/svn/t1 --without-apxs --without-swig-python
> % grep PYTHON Makefile | vipe
> PYTHON = python
> SWIG_PY_PYTHON = none
> %

Thank you for the review and confirmation.
 
> Just one question; see below.
>
> Yasuhito FUTATSUKI wrote on Sat, 30 May 2020 19:24 +0900:
>> +++ configure.ac (working copy)
>> @@ -1272,19 +1272,19 @@
>>
>> # Scripting and Bindings languages
>>
>> -# Python: Used for testsuite, and bindings
>> +# Python: Used for testsuite
>> AC_ARG_VAR([PYTHON], [Python interpreter command])
>>
>> PYTHON="`$abs_srcdir/build/find_python.sh`"
>> if test -z "$PYTHON"; then
>> - AC_MSG_WARN([Python 2.7 or later is required to run the testsuite])
>> - AC_MSG_WARN([or to use the Subversion Python bindings])
>> + AC_MSG_WARN([Python 2.7 or later is required to run the testsuite.])
>> AC_MSG_WARN([])
>> AC_MSG_WARN([If you have a suitable Python installed, but not on the])
>> AC_MSG_WARN([PATH, set the environment variable PYTHON to the full path])
>> AC_MSG_WARN([to the Python executable, and re-run configure])
>> + PYTHON=none
>> fi
>> -AC_PATH_PROGS(PYTHON, "$PYTHON", none)
>> +AC_SUBST(PYTHON)
>>
>
> Here configure sets PYTHON=none…
>
>> @@ -1291,16 +1291,95 @@
>> +# Python: as a target of SWIG Python bindings
>> +AC_ARG_WITH(swig_python,
>> +[AS_HELP_STRING([[--with-swig-python[=PATH|auto|no]|--without-swig-python]],
>> + [specify path to SWIG bindings target Python [default=auto]])],
>> +[],
>> +[
>> +if test "$PYTHON" = "no" -o "$PYTHON" = "none"; then
>> + with_swig_python=no
>> + AC_MSG_WARN([Disabling build of SWIG Python bindings by setting "none" to])
>> + AC_MSG_WARN([PYTHON envirionment variable is deprecated.])
>> + AC_MSG_WARN([])
>> + AC_MSG_WARN([Please use --without-swig-python instead.])
>
> …and here configure warns when $PYTHON is set to «none». Would this
> error message be printed when the value «none» was set by configure,
> above, rather than by the user?

Sure.

Moreover, $PYTHON in this context is always set by the find_python.sh
script except "none" set by above substitution in 'if test -z "$PYTHON"'
block. That is to say, without this patch, it is needed to hide Python
interpreter from the find_python.sh script to avoid check for SWIG
Python bindings.

Now I think this warning message itself means nothing, so I dropped
this warning for SWIG Python bindings.
 
> ---
>
> Some suggested changes to the English:
>

Thank you very much.

I updated the patch.

Thanks,

-- 
Yasuhito FUTATSUKI <futatuki_at_poem.co.jp>/<futatuki_at_yf.bsdclub.org>

Received on 2020-05-31 07:41:28 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.