Optimize make test
This commit is contained in:
parent
604bd43bcd
commit
16f7eeb50f
58
backport-optimize-make-test.patch
Normal file
58
backport-optimize-make-test.patch
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
From 00a1c26aa072cd17de8a185d9afbc70070d3eab6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mike Bayer <mike_mp@zzzcomputing.com>
|
||||||
|
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
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: python-mako
|
Name: python-mako
|
||||||
Version: 1.0.6
|
Version: 1.0.6
|
||||||
Release: 12
|
Release: 13
|
||||||
Summary: Mako template library for Python
|
Summary: Mako template library for Python
|
||||||
License: (MIT and Python) and (BSD or GPLv2)
|
License: (MIT and Python) and (BSD or GPLv2)
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -8,6 +8,8 @@ URL: http://www.makotemplates.org/
|
|||||||
Source0: https://bitbucket.org/zzzeek/mako/get/rel_%(echo %{version} | sed "s/\./_/g").tar.bz2
|
Source0: https://bitbucket.org/zzzeek/mako/get/rel_%(echo %{version} | sed "s/\./_/g").tar.bz2
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
|
Patch6000: backport-optimize-make-test.patch
|
||||||
|
|
||||||
BuildRequires: python2-devel python2-pytest python2-setuptools
|
BuildRequires: python2-devel python2-pytest python2-setuptools
|
||||||
BuildRequires: python2-markupsafe python2-nose python2-mock
|
BuildRequires: python2-markupsafe python2-nose python2-mock
|
||||||
BuildRequires: python3-devel python3-pytest python3-setuptools
|
BuildRequires: python3-devel python3-pytest python3-setuptools
|
||||||
@ -47,7 +49,7 @@ Requires: python3-mako = %{version}-%{release}
|
|||||||
Help file of Mako library for Python in text and HTML formats.
|
Help file of Mako library for Python in text and HTML formats.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n zzzeek-mako-8e83c7561e3c
|
%autosetup -n zzzeek-mako-8e83c7561e3c -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{?with_python2:%py2_build}
|
%{?with_python2:%py2_build}
|
||||||
@ -82,6 +84,12 @@ rm -rf doc/build
|
|||||||
%doc doc
|
%doc doc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 24 2020 wenzhanli<wenzhanli2m@huawei.com> - 1.0.6-13
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:Optimize make test
|
||||||
|
|
||||||
* Sat Oct 19 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.0.6-12
|
* Sat Oct 19 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.0.6-12
|
||||||
- Type:NA
|
- Type:NA
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user