From 7022269bc4abb47ce72d628c1291f73a4a5950e5 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Thu, 7 Oct 2021 14:40:10 +0200 Subject: [PATCH] Enable Python tests --- ...ad_simple_cast-test-with-Python-3.10.patch | 23 +++++++++++++++++++ swig.spec | 15 +++++++----- 2 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 swig-4.0.2-Fix-overload_simple_cast-test-with-Python-3.10.patch diff --git a/swig-4.0.2-Fix-overload_simple_cast-test-with-Python-3.10.patch b/swig-4.0.2-Fix-overload_simple_cast-test-with-Python-3.10.patch new file mode 100644 index 0000000..a3c8cff --- /dev/null +++ b/swig-4.0.2-Fix-overload_simple_cast-test-with-Python-3.10.patch @@ -0,0 +1,23 @@ +From a2850397ba3eec5d4c58304cf8277ca535919760 Mon Sep 17 00:00:00 2001 +From: Julien Schueller +Date: Thu, 5 Aug 2021 14:05:10 +0200 +Subject: [PATCH] [Python] Fix overload_simple_cast test with 3.10 + +Closes #2044 +--- + Examples/test-suite/python/python_overload_simple_cast_runme.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Examples/test-suite/python/python_overload_simple_cast_runme.py b/Examples/test-suite/python/python_overload_simple_cast_runme.py +index fc398ab29b9..7a0174af8a2 100644 +--- a/Examples/test-suite/python/python_overload_simple_cast_runme.py ++++ b/Examples/test-suite/python/python_overload_simple_cast_runme.py +@@ -9,6 +9,8 @@ def __init__(self, x): + def __int__(self): + return self.x + ++ def __index__(self): ++ return self.x + + class Ad: + diff --git a/swig.spec b/swig.spec index bae5053..fbc65b9 100644 --- a/swig.spec +++ b/swig.spec @@ -25,8 +25,7 @@ %else %{!?rubylang:%global rubylang 1} %endif -# Disable Python tests - they fail with 3.10.0~b2 -%{!?python3lang:%global python3lang 0} +%{!?python3lang:%global python3lang 1} %if 0%{?rhel} %{!?golang:%global golang 0} @@ -46,8 +45,7 @@ # Do not run Go tests, they failed with 4.0.0 on ppc64le %ifarch %{ix86} x86_64 %{arm} aarch64 -# Tests do not work with Go 1.15 -%{!?golang:%global golang 0} +%{!?golang:%global golang 1} %else %{!?golang:%global golang 0} %endif @@ -55,7 +53,7 @@ Summary: Connects C/C++/Objective C to some high-level programming languages Name: swig Version: 4.0.2 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv3+ and BSD URL: http://swig.sourceforge.net/ Source0: http://downloads.sourceforge.net/project/swig/swig/swig-%{version}/swig-%{version}.tar.gz @@ -69,13 +67,15 @@ Source4: ccache-swig.csh # https://github.com/swig/swig/pull/1702 Patch0: swig-Upgrade-to-support-newer-NodeJS.patch -# Backport PHP 7.x and 88888888 updates +# Backport PHP 7.x and 8 updates Patch1: swig-4.0.2-Fix-overloaded-directed-methods-with-non-void-re.patch Patch2: swig-4.0.2-Fix-char-typecheck-typemap-to-accept-Null.patch Patch3: swig-4.0.2-Improve-PHP-object-creation.patch Patch4: swig-4.0.2-Support-PHP8.patch # octave 6 support - rebased version of https://github.com/swig/swig/pull/2020 Patch5: swig-octave-6.patch +# Fix overload_simple_cast test with Python 3.10 GH#2044 +Patch6: swig-4.0.2-Fix-overload_simple_cast-test-with-Python-3.10.patch BuildRequires: make BuildRequires: perl-interpreter, pcre-devel @@ -346,6 +346,9 @@ install -pm 644 Tools/swig.gdb %{buildroot}%{_datadir}/%{name}/gdb %{_datadir}/%{name}/gdb %changelog +* Thu Oct 07 2021 Jitka Plesnikova - 4.0.2-10 +- Enable Python tests + * Tue Aug 10 2021 Orion Poplawski - 4.0.2-9 - Rebuild for octave 6.3.0