git: e363da0a843e - main - devel/py-l18n: Fix build with Python 3.10

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 01 Nov 2021 21:29:32 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e363da0a843e7ec714aa2b3706411ee0c05af82d

commit e363da0a843e7ec714aa2b3706411ee0c05af82d
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2021-11-01 21:18:45 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2021-11-01 21:28:45 +0000

    devel/py-l18n: Fix build with Python 3.10
---
 devel/py-l18n/Makefile             |  2 +-
 devel/py-l18n/files/patch-setup.py | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/devel/py-l18n/Makefile b/devel/py-l18n/Makefile
index e91905ff8fe3..ac90e6a9913d 100644
--- a/devel/py-l18n/Makefile
+++ b/devel/py-l18n/Makefile
@@ -15,7 +15,7 @@ LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytz>=2020.1,1,1:devel/py-pytz@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}six>=0:devel/py-six@${PY_FLAVOR}
 
-USES=		python:3.6-3.9
+USES=		python:3.6+
 USE_PYTHON=	autoplist concurrent distutils
 
 NO_ARCH=	yes
diff --git a/devel/py-l18n/files/patch-setup.py b/devel/py-l18n/files/patch-setup.py
new file mode 100644
index 000000000000..739eb79fa71b
--- /dev/null
+++ b/devel/py-l18n/files/patch-setup.py
@@ -0,0 +1,11 @@
+--- setup.py.orig	2020-10-31 03:58:31 UTC
++++ setup.py
+@@ -69,7 +69,7 @@ class PredistBuild(object):
+         log.info('translation files built successfully')
+ 
+ cmd_classes = {}
+-for cmd in ('sdist', 'bdist', 'bdist_egg', 'bdist_rpm', 'bdist_wininst'):
++for cmd in ('sdist', 'bdist', 'bdist_egg'):
+     try:
+         cmd_module = getattr(__import__('setuptools.command', fromlist=[cmd]),
+                              cmd)