diff options
| author | Kurt Kiefer <kurt.kiefer@arthrex.com> | 2021-10-18 13:28:34 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2021-10-19 09:23:08 -0700 |
| commit | 72977342041ce045f799b71b5f697ce899355c6d (patch) | |
| tree | e3cf0bcb102b787bca6f070450ae5c59ca22ff08 /meta-python | |
| parent | 7892e882a2b656dac9677e72b366c6452fb742ee (diff) | |
| download | meta-openembedded-72977342041ce045f799b71b5f697ce899355c6d.tar.gz | |
gyp: fix for compatibility with Python 3.10
The collections abstract base classes module is finally moved to
collections.abc starting in Python 3.10.
Fixes the following problem encountered making use of gyp:
| File "[...]/usr/lib/python3.10/site-packages/gyp/common.py", line 497, in <module>
| class OrderedSet(collections.MutableSet):
| AttributeError: module 'collections' has no attribute 'MutableSet'
Signed-off-by: Kurt Kiefer <kurt.kiefer@arthrex.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python')
| -rw-r--r-- | meta-python/recipes-devtools/gyp/gyp/0001-Fix-for-Python-3.10-compatibility.patch | 25 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/gyp/gyp_git.bb | 4 |
2 files changed, 28 insertions, 1 deletions
diff --git a/meta-python/recipes-devtools/gyp/gyp/0001-Fix-for-Python-3.10-compatibility.patch b/meta-python/recipes-devtools/gyp/gyp/0001-Fix-for-Python-3.10-compatibility.patch new file mode 100644 index 0000000000..2b88023fe8 --- /dev/null +++ b/meta-python/recipes-devtools/gyp/gyp/0001-Fix-for-Python-3.10-compatibility.patch | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | From bfe579283e5fcab60172818bfe4e6e1d40c2bed0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Kurt Kiefer <kurt.kiefer@arthrex.com> | ||
| 3 | Date: Mon, 18 Oct 2021 11:21:14 -0700 | ||
| 4 | Subject: [PATCH] Fix for Python 3.10 compatibility | ||
| 5 | |||
| 6 | The collections.abc module replaces collections for Python 3.10 | ||
| 7 | |||
| 8 | Signed-off-by: Kurt Kiefer <kurt.kiefer@arthrex.com> | ||
| 9 | --- | ||
| 10 | pylib/gyp/common.py | 2 +- | ||
| 11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 12 | |||
| 13 | diff --git a/pylib/gyp/common.py b/pylib/gyp/common.py | ||
| 14 | index b268d229..4f9cb0ec 100644 | ||
| 15 | --- a/pylib/gyp/common.py | ||
| 16 | +++ b/pylib/gyp/common.py | ||
| 17 | @@ -494,7 +494,7 @@ def uniquer(seq, idfun=None): | ||
| 18 | |||
| 19 | |||
| 20 | # Based on http://code.activestate.com/recipes/576694/. | ||
| 21 | -class OrderedSet(collections.MutableSet): | ||
| 22 | +class OrderedSet(collections.abc.MutableSet): | ||
| 23 | def __init__(self, iterable=None): | ||
| 24 | self.end = end = [] | ||
| 25 | end += [None, end, end] # sentinel node for doubly linked list | ||
diff --git a/meta-python/recipes-devtools/gyp/gyp_git.bb b/meta-python/recipes-devtools/gyp/gyp_git.bb index d668d1ca10..73329cec7c 100644 --- a/meta-python/recipes-devtools/gyp/gyp_git.bb +++ b/meta-python/recipes-devtools/gyp/gyp_git.bb | |||
| @@ -4,7 +4,9 @@ LICENSE = "BSD-3-Clause" | |||
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ab828cb8ce4c62ee82945a11247b6bbd" | 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ab828cb8ce4c62ee82945a11247b6bbd" |
| 5 | SECTION = "devel" | 5 | SECTION = "devel" |
| 6 | 6 | ||
| 7 | SRC_URI = "git://chromium.googlesource.com/external/gyp;protocol=https" | 7 | SRC_URI = "git://chromium.googlesource.com/external/gyp;protocol=https \ |
| 8 | file://0001-Fix-for-Python-3.10-compatibility.patch \ | ||
| 9 | " | ||
| 8 | SRCREV = "caa60026e223fc501e8b337fd5086ece4028b1c6" | 10 | SRCREV = "caa60026e223fc501e8b337fd5086ece4028b1c6" |
| 9 | 11 | ||
| 10 | S = "${WORKDIR}/git" | 12 | S = "${WORKDIR}/git" |
