summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/cheetah3')
-rw-r--r--dev-python/cheetah3/cheetah3-3.2.6.ebuild8
-rw-r--r--dev-python/cheetah3/files/cheetah3-3.2.6-fix-py3.10-tests.patch27
-rw-r--r--dev-python/cheetah3/metadata.xml3
3 files changed, 35 insertions, 3 deletions
diff --git a/dev-python/cheetah3/cheetah3-3.2.6.ebuild b/dev-python/cheetah3/cheetah3-3.2.6.ebuild
index 750ee0a3732..c4cb900671d 100644
--- a/dev-python/cheetah3/cheetah3-3.2.6.ebuild
+++ b/dev-python/cheetah3/cheetah3-3.2.6.ebuild
@@ -2,8 +2,8 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{8..9} )
-DISTUTILS_USE_SETUPTOOLS=bdepend
+
+PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
DESCRIPTION="Python-powered template engine and code generator"
@@ -22,6 +22,10 @@ BDEPEND="${RDEPEND}"
DOCS=( ANNOUNCE.rst README.rst TODO )
+PATCHES=(
+ "${FILESDIR}/${P}-fix-py3.10-tests.patch"
+)
+
python_prepare_all() {
# Disable broken tests.
sed \
diff --git a/dev-python/cheetah3/files/cheetah3-3.2.6-fix-py3.10-tests.patch b/dev-python/cheetah3/files/cheetah3-3.2.6-fix-py3.10-tests.patch
new file mode 100644
index 00000000000..845520fb02a
--- /dev/null
+++ b/dev-python/cheetah3/files/cheetah3-3.2.6-fix-py3.10-tests.patch
@@ -0,0 +1,27 @@
+From 112dddd8fa5fb9c285fb8ef2818abfef99365070 Mon Sep 17 00:00:00 2001
+From: Victor Stinner <vstinner@python.org>
+Date: Tue, 19 Jan 2021 11:19:15 +0100
+Subject: [PATCH] Skip test_import_bootlocale() on Python 3.10
+
+The _bootlocale module has been removed from Python 3.10:
+https://github.com/python/cpython/commit/b62bdf71ea0cd52041d49691d8ae3dc645bd48e1
+https://bugs.python.org/issue42208
+---
+ Cheetah/Tests/ImportHooks.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Cheetah/Tests/ImportHooks.py b/Cheetah/Tests/ImportHooks.py
+index d7b5f5d..bc0239c 100644
+--- a/Cheetah/Tests/ImportHooks.py
++++ b/Cheetah/Tests/ImportHooks.py
+@@ -87,7 +87,9 @@ def test_import_builtin(self):
+ return
+ raise self.fail("All builtin modules are imported")
+
+- if not PY2:
++ # _bootlocale was removed in Python 3.10:
++ # https://bugs.python.org/issue42208
++ if not PY2 and sys.version_info < (3, 10):
+ def test_import_bootlocale(self):
+ if '_bootlocale' in sys.modules:
+ del sys.modules['_bootlocale']
diff --git a/dev-python/cheetah3/metadata.xml b/dev-python/cheetah3/metadata.xml
index 52f8ccc1f81..2e25efbd05c 100644
--- a/dev-python/cheetah3/metadata.xml
+++ b/dev-python/cheetah3/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
@@ -11,5 +11,6 @@ are its principle user group, but it has many potential uses and is also being
used to generate C++ game code, Java, SQL, form emails, and even Python code.</longdescription>
<upstream>
<remote-id type="pypi">Cheetah3</remote-id>
+ <remote-id type="github">CheetahTemplate3/cheetah3</remote-id>
</upstream>
</pkgmetadata>