dev-python/mako: Sync with Gentoo

It's from Gentoo commit 1779c5dddbdb396aa84d3e2d06c0b9c9a6cd71a4.
This commit is contained in:
Krzesimir Nowak 2022-03-22 13:39:07 +01:00
parent db434008fe
commit 3a5f257e4b
5 changed files with 64 additions and 107 deletions

View File

@ -1,2 +1 @@
DIST Mako-1.1.4.tar.gz 479823 BLAKE2B 048c63c6caf493b9809dbcda8d1d697a7a25c8d22e97f439facae64b26d5b8f5f3002ff65529e9599e6069482fa25d6db95d810175f7f674f5af02cbd3f9f5e3 SHA512 4844c1d6c8d0d474b4ca4e1b31d3557747fc7e30f70a1976163a26b46b1b45c4c96ca6101fbef252b4e3bb4a61635d2a2c6d1c2933fde5b82bb1a1306f31ff84 DIST Mako-1.2.0.tar.gz 488603 BLAKE2B 30ef597e2dd500d52d02118e0ec8a40cfeeff00604eb9fec887df4aff794aed7d6a1d78b2defb6f985947f9429d912a083b9941ee30b1e53ef32890d19e94158 SHA512 ad608016d7785a735a28ea18f697be4882da747e3da32e4a7c7be4bf846d37e4d3374d78e62ef85607ae9f3f73ee35dc78b473347e4110c059a504be2c497c6e
DIST Mako-1.1.5.tar.gz 494647 BLAKE2B 5e4f3e111137820997eb39bbaa1af35ac97de101757b66b6efd097e0d35f6d020bfc8b5b98da8c03fc81a907f228526543f5bdaaf161c4f850418cbcaaf81770 SHA512 3eff75f1a94f8e01131ce118df73be1ade79306562ae2ca68079eb2b64ef82c48c09cfd7ed6eda42819bf50c70941cf4115f8918b4d8187f7489717c7d4a423b

View File

@ -1,31 +0,0 @@
From 5559e0205c7fbf2f4a321a978249a41c1d073278 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Fri, 21 Feb 2020 19:03:29 +0100
Subject: [PATCH] Skip broken test on PyPy3
---
test/test_exceptions.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/test_exceptions.py b/test/test_exceptions.py
index 2ec46cf..6a30b48 100644
--- a/test/test_exceptions.py
+++ b/test/test_exceptions.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import sys
+import unittest
from mako import compat
from mako import exceptions
@@ -429,6 +430,7 @@ ${foo()}
else:
assert False
+ @unittest.skipIf(hasattr(sys, 'pypy_version_info'), 'Broken on pypy3')
def test_alternating_file_names(self):
l = TemplateLookup()
l.put_string(
--
2.25.1

View File

@ -1,37 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( pypy3 python3_{7..10} )
inherit distutils-r1 optfeature
MY_P=${P^}
DESCRIPTION="A Python templating language"
HOMEPAGE="https://www.makotemplates.org/ https://pypi.org/project/Mako/"
SRC_URI="mirror://pypi/${MY_P:0:1}/${PN^}/${MY_P}.tar.gz"
S="${WORKDIR}/${MY_P}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="doc"
RDEPEND=">=dev-python/markupsafe-0.9.2[${PYTHON_USEDEP}]"
PATCHES=(
"${FILESDIR}"/mako-1.1.1-pypy3-test.patch
)
distutils_enable_tests pytest
python_install_all() {
rm -r doc/build || die
use doc && local HTML_DOCS=( doc/. )
distutils-r1_python_install_all
}
pkg_postinst() {
optfeature "caching support" dev-python/beaker
}

View File

@ -1,37 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( pypy3 python3_{8..10} )
inherit distutils-r1 optfeature
MY_P=${P^}
DESCRIPTION="A Python templating language"
HOMEPAGE="https://www.makotemplates.org/ https://pypi.org/project/Mako/"
SRC_URI="mirror://pypi/${MY_P:0:1}/${PN^}/${MY_P}.tar.gz"
S="${WORKDIR}/${MY_P}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="doc"
RDEPEND=">=dev-python/markupsafe-0.9.2[${PYTHON_USEDEP}]"
PATCHES=(
"${FILESDIR}"/mako-1.1.1-pypy3-test.patch
)
distutils_enable_tests pytest
python_install_all() {
rm -r doc/build || die
use doc && local HTML_DOCS=( doc/. )
distutils-r1_python_install_all
}
pkg_postinst() {
optfeature "caching support" dev-python/beaker
}

View File

@ -0,0 +1,63 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( pypy3 python3_{8..11} )
inherit distutils-r1
MY_P=${P^}
DESCRIPTION="A Python templating language"
HOMEPAGE="
https://www.makotemplates.org/
https://github.com/sqlalchemy/mako/
https://pypi.org/project/Mako/
"
SRC_URI="mirror://pypi/${MY_P:0:1}/${PN^}/${MY_P}.tar.gz"
S="${WORKDIR}/${MY_P}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="doc"
RDEPEND="
>=dev-python/markupsafe-0.9.2[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
dev-python/Babel[${PYTHON_USEDEP}]
)
"
distutils_enable_tests pytest
python_test() {
local EPYTEST_DESELECT=(
# change in pygments
test/test_exceptions.py::ExceptionsTest::test_format_exceptions_pygments
)
[[ ${EPYTHON} == pypy3 ]] && EPYTEST_DESELECT+=(
test/test_exceptions.py::ExceptionsTest::test_alternating_file_names
)
[[ ${EPYTHON} == python3.11 ]] && EPYTEST_DESELECT+=(
# py3.11 changed tracebacks
test/test_exceptions.py::ExceptionsTest::test_tback_no_trace_from_py_file
test/test_exceptions.py::ExceptionsTest::test_tback_trace_from_py_file
)
local EPYTEST_IGNORE=(
# lingua is not packaged in Gentoo and the skip is currently broken
# https://github.com/sqlalchemy/mako/pull/357
test/ext/test_linguaplugin.py
)
epytest
}
python_install_all() {
rm -r doc/build || die
use doc && local HTML_DOCS=( doc/. )
distutils-r1_python_install_all
}