Branko Čibej wrote:
On 13.11.2019 14:22, Jun Omae wrote:
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
[...]
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.

Looks good.

Nathan wrote in another thread:
Note: If the patch contributed by Jun Omae a little earlier is
committed, the text regarding SWIG 4.0.0+ in INSTALL will need to be
adjusted accordingly. I have not changed it because the patch has not
been committed yet.

Perhaps someone could commit this if there are no other concerns with it, and adjust INSTALL at the same time?

- Julian

Reply via email to