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

Re: [Patch] Support building with SWIG 4 on Python 3.x

From: Branko Čibej <brane_at_apache.org>
Date: Wed, 13 Nov 2019 15:34:25 +0100

On 13.11.2019 15:05, Branko Čibej wrote:
> On 13.11.2019 14:52, Branko Čibej wrote:
>> On 13.11.2019 14:22, Jun Omae wrote:
>>> Hi,
>>>
>>> I tried to support building SWIG 4 on Python 3.x, and post patch.
>>>
>>> Since SWIG 4, -classic and -modern options have been dropped. As the
>>> result,
>>> SWIG generates new-style classes which are using property() instead of
>>> __swig_[gs]etmethods__.
>>>
>>> In attached patch, SWIG would generate new-style classes without
>>> __swig_[gs]etmethods__ when SWIG 3.x is used (-modern option would be
>>> used),
>>> in the same as SWIG 4.x.
>>>
>>> Verified by check-swig-py with:
>>>
>>>  - Python 3.[5678] with SWIG 1.3.40, 2.0.12, 3.0.12 on Ubuntu 16.04 amd64
>>>  - Python 2.7      with SWIG 3.0.12 and 4.0.1       on Ubuntu 16.04 amd64
>> Can you please update your patch so that it applies to the current
>> trunk? The current version causes conflicts on all three files that it
>> modifies.
>
> Oops. Actually, it's 'svn patch --strip 1' that fails, even though that
> should be the correct invocation. Without '--strip 1', it works, as does
> plain 'patch -p1'. That's not so good.

Works with Python 3.7 and Swig 4.0.1 on macOS. I also tested swig-rb and
swig-pl, just to make sure. I didn't test Python 2, but the buildbots
will do that when the patch is committed.

-- Brane
Received on 2019-11-13 15:36:12 CET

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.