diff --git a/backport-optimize-make-test.patch b/backport-optimize-make-test.patch deleted file mode 100644 index d7fb18f5e8e2eb61e7b7f84f060c872baf0ccf8c..0000000000000000000000000000000000000000 --- a/backport-optimize-make-test.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 00a1c26aa072cd17de8a185d9afbc70070d3eab6 Mon Sep 17 00:00:00 2001 -From: Mike Bayer -Date: Wed, 20 Mar 2019 11:15:47 -0400 -Subject: [PATCH] Add Constant to _ast_util - ---- - doc/build/changelog.rst | 6 ++++++ - mako/_ast_util.py | 3 +++ - tox.ini | 2 +- - 3 files changed, 10 insertions(+), 1 deletion(-) - -diff --git a/doc/build/changelog.rst b/doc/build/changelog.rst -index 7d110f3..24c6100 100644 ---- a/doc/build/changelog.rst -+++ b/doc/build/changelog.rst -@@ -8,6 +8,12 @@ Changelog - .. changelog:: - :version: 1.0.6 - :released: Wed Nov 9 2016 -+.. changelog:: -+ :tags: bug -+ :tickets: 281 -+ -+ Fixed an element in the AST Python generator which changed -+ for Python 3.8, causing expression generation to fail. - - .. change:: - :tags: feature -diff --git a/mako/_ast_util.py b/mako/_ast_util.py -index 8d19b0d..d770451 100644 ---- a/mako/_ast_util.py -+++ b/mako/_ast_util.py -@@ -679,6 +679,9 @@ class SourceGenerator(NodeVisitor): - - def visit_Num(self, node): - self.write(repr(node.n)) -+ # newly needed in Python 3.8 -+ def visit_Constant(self, node): -+ self.write(repr(node.n)) - - def visit_Tuple(self, node): - self.write('(') -diff --git a/tox.ini b/tox.ini -index 19016de..45d7f00 100644 ---- a/tox.ini -+++ b/tox.ini -@@ -1,7 +1,7 @@ - # content of: tox.ini , put in same dir as setup.py - [tox] - minversion=1.8.dev1 --envlist = py{26,27,34,35} -+envlist = py{26,27,34,35,36,37,38} - - [testenv] - cov_args=--cov=mako --cov-report term --cov-report xml --- -2.23.0 - diff --git a/backport-use-Constant-value.patch b/backport-use-Constant-value.patch deleted file mode 100644 index 3e8725b8e4d67b52287c220c92bf81d53a97415e..0000000000000000000000000000000000000000 --- a/backport-use-Constant-value.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 724eab2bcdf020a9dd3893b372730dd19c82f036 Mon Sep 17 00:00:00 2001 -From: fwx937284 -Date: Wed, 8 Jul 2020 15:24:47 +0800 -Subject: [PATCH] Use Constant.value, not Constant.n - ---- - mako/_ast_util.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mako/_ast_util.py b/mako/_ast_util.py -index d770451..3120659 100644 ---- a/mako/_ast_util.py -+++ b/mako/_ast_util.py -@@ -681,7 +681,7 @@ class SourceGenerator(NodeVisitor): - self.write(repr(node.n)) - # newly needed in Python 3.8 - def visit_Constant(self, node): -- self.write(repr(node.n)) -+ self.write(repr(node.value)) - - def visit_Tuple(self, node): - self.write('(') --- -2.23.0 - diff --git a/python-mako.spec b/python-mako.spec index 2ebff0c9ff68ad65d19f9bd9c33744f2bd83aa10..6f4fcd689c84a5e1cafa511ca29b958952a4c58a 100644 --- a/python-mako.spec +++ b/python-mako.spec @@ -1,6 +1,6 @@ Name: python-mako -Version: 1.0.6 -Release: 16 +Version: 1.1.3 +Release: 1 Summary: Mako template library for Python License: (MIT and Python) and (BSD or GPLv2) Group: Development/Languages @@ -8,9 +8,6 @@ URL: http://www.makotemplates.org/ Source0: https://bitbucket.org/zzzeek/mako/get/rel_%(echo %{version} | sed "s/\./_/g").tar.bz2 BuildArch: noarch -Patch6000: backport-optimize-make-test.patch -Patch6001: backport-use-Constant-value.patch - BuildRequires: python3-devel python3-pytest python3-setuptools BuildRequires: python3-markupsafe python3-mock python3-nose @@ -38,7 +35,7 @@ Requires: python3-mako = %{version}-%{release} Help file of Mako library for Python in text and HTML formats. %prep -%autosetup -n zzzeek-mako-8e83c7561e3c -p1 +%autosetup -n zzzeek-mako-1f87991a8c42 -p1 %build %{?with_python3:%py3_build} @@ -49,9 +46,7 @@ mv %{buildroot}/%{_bindir}/mako-render %{buildroot}/%{_bindir}/python3-mako-rend rm -rf doc/build %check -rm setup.cfg -export LANG=en_US.UTF-8 -%{__python3} setup.py test +%{__python3} -m pytest -v %files -n python3-mako %license LICENSE AUTHORS @@ -63,6 +58,9 @@ export LANG=en_US.UTF-8 %doc doc %changelog +* Tue Feb 2 2021 wangjie - 1.1.3-1 +- upgrade version to 1.1.3 + * Tue Jan 19 2021 tianwei - 1.0.6-16 - Type:NA - ID:NA diff --git a/rel_1_0_6.tar.bz2 b/rel_1_0_6.tar.bz2 deleted file mode 100644 index 8a4033080c0ef02b294d9491e9488fe8d90ff768..0000000000000000000000000000000000000000 Binary files a/rel_1_0_6.tar.bz2 and /dev/null differ diff --git a/rel_1_1_3.tar.bz2 b/rel_1_1_3.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..13b6f446672c65d06d96df282eb4fab22d8cfd35 Binary files /dev/null and b/rel_1_1_3.tar.bz2 differ