From 16d1b4d0e9641cd570f97fa9a54315dba08fd24f Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Feb 12 2021 11:28:07 +0000 Subject: Add patch for Python 3.10+ compatibility --- diff --git a/meson-python3.10.patch b/meson-python3.10.patch new file mode 100644 index 0000000..9cfddc5 --- /dev/null +++ b/meson-python3.10.patch @@ -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' + diff --git a/meson.spec b/meson.spec index a35360d..298a36b 100644 --- a/meson.spec +++ b/meson.spec @@ -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