Karl Berry wrote on Mon, 01 Jun 2020 15:01 -0600:
> With svn-1.14.0, if "python" is Python 2 (it's still 2.6.6 on CentOS7),
> and --with-swig is given, make swig-py succeeds, but check-swig-py fails
⋮
> Assuming it's intentional that Python 2 isn't supported any more.

Yes and no.  If you want to build against Python 2, you have to start
the build from autogen.sh.  We've added this to the documentation after
1.14.0:

    % diff {14x,trunk}/INSTALL 
    6c6
    < $LastChangedDate: 2020-02-17 03:49:42 +0000 (Mon, 17 Feb 2020) $
    ---
    > $LastChangedDate: 2020-05-20 18:58:15 +0000 (Wed, 20 May 2020) $
    508a509,514
    >       Note: If you are using a Subversion distribution tarball and want
    >       to build the Python bindings for Python 2, you should rebuild
    >       the build environment in non-release mode by running
    >       'sh autogen.sh' before running the ./configure script; see
    >       section II.B for more about autogen.sh.
    > 
    602c608
    <       Subversion uses LZ4 compression libary version r129 or above. 
Configure
    ---
    >       Subversion uses LZ4 compression library version r129 or above. 
Configure
    zsh: exit 1     diff {14x,trunk}/INSTALL

This documentation change is expected to be released in 1.14.1.

> It would be nice if the configure script bailed out in this
> configuration instead of leaving it for a painful Python message after
> building everything.

As in your other thread, configure shouldn't fail because it doesn't
know for a fact that the swig-py buildings are to be built.  The
earliest point at which we could fail is at the very start of «make
swig-py».

The exception to that is when --with-py3c [or the upcoming
--with-swig-python (see link below)] is passed.  If either of these
flags is passed, configure should fail if either py3c or the Python
installation which the swig-py bindings are to be built against is not
available.

Patches to implement some or all of the above checks will be welcome.
I'm not sure whether they should target trunk or 1.14.x — it's
conceivable that by the next minor release we'll drop py2 support
entirely — and there's an in-flight patch to beware of conflicts with:

https://mail-archives.apache.org/mod_mbox/subversion-dev/202005.mbox/raw/%3c104b70d1-46b0-977a-fe40-c5266c24e...@poem.co.jp%3e/2

> Also, py3c is apparently necessary.

Someone has apparently not read the release notes.

> Again it would be nice if configure bailed out if it's not present.

See above.

> After discovering that, I installed the CentOS packages python3 and
> python3-devel and swig3 (all required, it seemed) and configured with
> PYTHON=python3, and gave --with-py3c=`pwd`/py3c (after downloading py3c
> via getdeps.sh). This worked.

Let's take these one at a time.

- py3c: We should probably make configure look for py3c at the path
  get-deps.sh downloads it to.  Likewise for the other «get-deps.sh»-able
  dependencies.  Patches to implement any part of this will be welcome.

- py3: We _have_ dropped support for py2, but we've overlooked making
  the build use py3 in preference to py2 by default if both are available:

  https://subversion.apache.org/docs/release-notes/1.14#autogen_sh-py2-py3

- swig isn't required for tarball builds at all (except in the py2
  case).  It was likely only required because you explicitly passed
  --with-swig to configure.

Daniel

Reply via email to