Skip to content

Commit

Permalink
devel/py-gyp: fix for python 3.11
Browse files Browse the repository at this point in the history
This patch is fixing runtime on python 3.11 and allows to build
japanese/mozc-server and japanese/mozc-tool with python3.11
PR:		276707
PR:     275494
Approved by:	hrs (maintainer timout, 14d+)
  • Loading branch information
mexicarne committed Feb 18, 2024
1 parent 02ddaaa commit 0f93653
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions devel/py-gyp/Makefile
@@ -1,5 +1,6 @@
PORTNAME= gyp
PORTVERSION= 20200512
PORTREVISION= 1
CATEGORIES= devel python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

Expand Down
23 changes: 23 additions & 0 deletions devel/py-gyp/files/patch-pylib_gyp_common.py
@@ -0,0 +1,23 @@
--- pylib/gyp/common.py.orig 2020-05-12 14:59:53 UTC
+++ pylib/gyp/common.py
@@ -12,6 +12,11 @@ import sys
import tempfile
import sys

+if sys.version_info.major == 3 and sys.version_info.minor >= 10:
+ from collections.abc import MutableSet
+ collections.MutableSet = collections.abc.MutableSet
+else:
+ from collections import MutableSet

# A minimal memoizing decorator. It'll blow up if the args aren't immutable,
# among other "problems".
@@ -494,7 +499,7 @@ def uniquer(seq, idfun=None):


# Based on http://code.activestate.com/recipes/576694/.
-class OrderedSet(collections.MutableSet):
+class OrderedSet(MutableSet):
def __init__(self, iterable=None):
self.end = end = []
end += [None, end, end] # sentinel node for doubly linked list

0 comments on commit 0f93653

Please sign in to comment.