Enable Python tests

This commit is contained in:
Jitka Plesnikova 2021-10-07 14:40:10 +02:00
parent a7dae3fb98
commit 7022269bc4
2 changed files with 32 additions and 6 deletions

View File

@ -0,0 +1,23 @@
From a2850397ba3eec5d4c58304cf8277ca535919760 Mon Sep 17 00:00:00 2001
From: Julien Schueller <schueller@phimeca.com>
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:

View File

@ -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 <jplesnik@redhat.com> - 4.0.2-10
- Enable Python tests
* Tue Aug 10 2021 Orion Poplawski <orion@nwra.com> - 4.0.2-9
- Rebuild for octave 6.3.0