From 8ee74bc8b5e3c467123d0572944101dcc68cef93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20M=C3=BCller?= <mueller@kip.uni-heidelberg.de> Date: Wed, 19 Jul 2023 10:13:32 +0200 Subject: [PATCH] fix[BrainScaleS]: support build of genpybind w/ Python@3.10: --- packages/genpybind/package.py | 3 ++ packages/genpybind/v0.2.1-python3.10.patch | 43 ++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 packages/genpybind/v0.2.1-python3.10.patch diff --git a/packages/genpybind/package.py b/packages/genpybind/package.py index b2a639b8..3f892433 100644 --- a/packages/genpybind/package.py +++ b/packages/genpybind/package.py @@ -50,6 +50,9 @@ class Genpybind(WafPackage): extends('python') + patch('v0.2.1-python3.10.patch', when='@:0.2.1 ^python@3.10:') + + def configure_args(self): args = super(Genpybind, self).configure_args() diff --git a/packages/genpybind/v0.2.1-python3.10.patch b/packages/genpybind/v0.2.1-python3.10.patch new file mode 100644 index 00000000..bdd22115 --- /dev/null +++ b/packages/genpybind/v0.2.1-python3.10.patch @@ -0,0 +1,43 @@ +diff --git a/genpybind/annotations.py b/genpybind/annotations.py +index 1dfd1f4..871ef4d 100644 +--- a/genpybind/annotations.py ++++ b/genpybind/annotations.py +@@ -3,7 +3,7 @@ + from __future__ import unicode_literals + + import ast +-import collections ++from collections.abc import Sequence + + from clang.cindex import CursorKind + +@@ -25,7 +25,7 @@ LOZENGE = u"â—Š" + SPECIAL_NAMES = {"true": True, "false": False, "default": None, "none": None} + + +-class Annotations(collections.Sequence): ++class Annotations(Sequence): + def __init__(self, annotations=None): + # type: (Union[None, Text, Iterable[Text]]) -> None + self._annotations = [] # type: List[AnnotationT] +diff --git a/genpybind/registry.py b/genpybind/registry.py +index 4f66ace..75ba7a9 100644 +--- a/genpybind/registry.py ++++ b/genpybind/registry.py +@@ -1,6 +1,6 @@ + from __future__ import unicode_literals + +-import collections ++from collections.abc import Mapping + import re + + from clang import cindex +@@ -16,7 +16,7 @@ if False: # pylint: disable=using-constant-test + RE_NON_IDENTIFIER = re.compile(r"[^a-zA-Z0-9_]+") + + +-class Registry(collections.Mapping): ++class Registry(Mapping): + def __init__(self, tags=None): + # type: (Optional[Iterable[Text]]) -> None + self._declarations = {} # type: Dict[Text, Optional[Declaration]] -- GitLab