Hi,

On Tue, Mar 22, 2022 at 9:10 AM Mark Phippard <markp...@gmail.com> wrote:
>
> On Mon, Mar 21, 2022 at 4:59 PM Stefan Sperling <s...@elego.de> wrote:
> >
> > On Mon, Mar 21, 2022 at 04:46:55PM -0400, Mark Phippard wrote:
> > > On Mon, Mar 21, 2022 at 4:31 PM Stefan Sperling <s...@elego.de> wrote:
> > > > This might be a swig problem? Perhaps the version of swig and the
> > > > version of python don't work well together? Not sure.
> > >
> > > HACKING implies I should use the version that the clean room
> > > environment installs and not what the OS installs so I ran:
> > >
> > > ./configure --with-swig=/opt/svnrm/prefix
> > >
> > > This could be an example where the docs are just not explicit enough
> > > and I was overthinking. Now that I think about it maybe the problem is
> > > that this is not found when I run the tests. Perhaps I should use the
> > > OS SWIG for building and testing? Makes me wonder how the clean room
> > > version is ever used though?
> >
> > While the clean-room env includes swig, it does not include python.
> > So python comes from the system. And, as far as I understand, python
> > is complaining about a syntax error in the code generated by swig.
> >
> > I would try to find out whether the clean-room swig expects a particular
> > range of python versions. Maybe you can use a corresponding version of
> > python in your docker image.
> >
> > What might also help is upgrading swig to a newer version. If upgrading
> > tools in the clean-room env fixes such problems then we should upgrade them.
>
> This seems to be the main thing I am stuck on. I used Debian Buster so
> that it would just be Python 2.7. It also occurred to me I was seeing
> this using the release tarball so SWIG would not even be involved any
> more .. right? The bindings were generated when the last RM generated
> the tarball.
>
> Does this ring any bells to anyone about why this is invalid?
>
>   File 
> "/home/svnrm/subversion-1.14.2/subversion/bindings/swig/python/libsvn/core.py",
> line 144
>     def apr_initialize() -> "apr_status_t":
>                                   ^
> SyntaxError: invalid syntax
>
> I have tried searching for "->" but not coming up with anything. It
> does seem vaguely familiar but I think I am remembering the similar
> Ruby operator that was deprecated. It seems like we are missing
> something obvious else this would have shown up when people signed the
> last release.
>
> Mark

The swig-py for Python 2 depends "swig -python -classic". However,
-classic option is no longer supported since SWIG 4. SWIG 3 should be
used for 1.14.x releases to support Python 2.7 (swig3.0 package is
able to use in Debian Buster).

In fact, source files bundled in subversion 1.14.1 archive are
generated by SWIG 3.0.12.

[[[
$ tar xaf ~/arc/subversion-1.14.1.tar.bz2 -O
subversion-1.14.1/subversion/bindings/swig/python/core.py | head -5
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

$ tar xaf ~/arc/subversion-1.14.1.tar.bz2 -O
subversion-1.14.1/subversion/bindings/swig/python/core.c | head -5
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.12
 *
 * This file is not intended to be easily readable and contains a number of
]]]


--
Jun Omae <jun6...@gmail.com> (大前 潤)

Reply via email to