Add patch for Python 3.10+ compatibility

This commit is contained in:
Miro Hrončok 2021-02-12 12:28:07 +01:00
parent c15c0285de
commit 16d1b4d0e9
2 changed files with 19 additions and 0 deletions

17
meson-python3.10.patch Normal file
View File

@ -0,0 +1,17 @@
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index a322d5f..12fbbe1 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -56,9 +56,10 @@ class TestProtocol(enum.Enum):
raise MesonException('unknown test format {}'.format(string))
def __str__(self) -> str:
- if self is self.EXITCODE:
+ cls = type(self)
+ if self is cls.EXITCODE:
return 'exitcode'
- elif self is self.GTEST:
+ elif self is cls.GTEST:
return 'gtest'
return 'tap'

View File

@ -14,6 +14,8 @@ License: ASL 2.0
URL: https://mesonbuild.com/
Source: https://github.com/mesonbuild/meson/releases/download/%{version_no_tilde .}/meson-%{version_no_tilde %{quote:}}.tar.gz
Patch0: %{name}-gcc11.patch
# https://github.com/mesonbuild/meson/pull/8332
Patch1: %{name}-python3.10.patch
BuildArch: noarch