git: 21f093c1d689 - main - devel/py-zope.sequencesort: Fix build with setuptools 58.0.0+
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 25 Mar 2022 13:50:26 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=21f093c1d6899310fb615430647416a22a2ace1f commit 21f093c1d6899310fb615430647416a22a2ace1f Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2022-03-25 13:32:32 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2022-03-25 13:38:15 +0000 devel/py-zope.sequencesort: Fix build with setuptools 58.0.0+ With hat: python --- devel/py-zope.sequencesort/files/patch-2to3 | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/devel/py-zope.sequencesort/files/patch-2to3 b/devel/py-zope.sequencesort/files/patch-2to3 new file mode 100644 index 000000000000..35377d9a7364 --- /dev/null +++ b/devel/py-zope.sequencesort/files/patch-2to3 @@ -0,0 +1,45 @@ +--- src/zope/sequencesort/ssort.py.orig 2007-10-03 03:58:37 UTC ++++ src/zope/sequencesort/ssort.py +@@ -66,13 +66,13 @@ def sort(sequence, sort=(), _=None, mapping=0): + + # clean the mess a bit + if multsort: # More than one sort key. +- sortfields = map(lambda x: x[0], sf_list) ++ sortfields = [x[0] for x in sf_list] + else: + sort = sf_list[0][0] + + elif sort: + if multsort: # More than one sort key. +- sortfields = map(lambda x: x[0], sort) ++ sortfields = [x[0] for x in sort] + else: + sort = sort[0][0] + +@@ -133,7 +133,7 @@ def nocase(str1, str2): + return cmp(str1.lower(), str2.lower()) + + import sys +-if sys.modules.has_key("locale"): # only if locale is already imported ++if "locale" in sys.modules: # only if locale is already imported + from locale import strcoll + + def strcoll_nocase(str1, str2): +@@ -157,7 +157,7 @@ def make_sortfunctions(sortfields, _): + elif l == 3: + pass + else: +- raise SyntaxError, "sort option must contains no more than 2 fields" ++ raise SyntaxError("sort option must contains no more than 2 fields") + + f_name = f[1] + +@@ -184,7 +184,7 @@ def make_sortfunctions(sortfields, _): + elif sort_order == "desc": + multiplier = -1 + else: +- raise SyntaxError, "sort direction must be either ASC or DESC" ++ raise SyntaxError("sort direction must be either ASC or DESC") + + sf_list.append((f[0], func, multiplier)) +