remove python2 support.

This commit is contained in:
桐小哥 2020-08-08 11:31:12 +08:00 committed by Gitee
parent db773a5e6a
commit f0f26438e8

View File

@ -1,6 +1,6 @@
Name: python-mako Name: python-mako
Version: 1.0.6 Version: 1.0.6
Release: 14 Release: 15
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
@ -11,8 +11,6 @@ BuildArch: noarch
Patch6000: backport-optimize-make-test.patch Patch6000: backport-optimize-make-test.patch
Patch6001: backport-use-Constant-value.patch Patch6001: backport-use-Constant-value.patch
BuildRequires: python2-devel python2-pytest python2-setuptools
BuildRequires: python2-markupsafe python2-nose python2-mock
BuildRequires: python3-devel python3-pytest python3-setuptools BuildRequires: python3-devel python3-pytest python3-setuptools
BuildRequires: python3-markupsafe python3-mock python3-nose BuildRequires: python3-markupsafe python3-mock python3-nose
@ -22,16 +20,6 @@ syntax which compiles into Python modules for maximum performance. Mako's syntax
and API borrows from the best ideas of many others, including Django templates, and API borrows from the best ideas of many others, including Django templates,
Cheetah, Myghty, and Genshi. Cheetah, Myghty, and Genshi.
%package -n python2-mako
Summary: Mako library for python 2
Requires: python2-markupsafe
Recommends: python2-beaker
%{?python_provide:%python_provide python2-mako}
%description -n python2-mako
Mako library for python 2.
%package -n python3-mako %package -n python3-mako
Summary: Mako library for Python 3 Summary: Mako library for Python 3
Requires: python3-markupsafe Requires: python3-markupsafe
@ -53,28 +41,16 @@ Help file of Mako library for Python in text and HTML formats.
%autosetup -n zzzeek-mako-8e83c7561e3c -p1 %autosetup -n zzzeek-mako-8e83c7561e3c -p1
%build %build
%{?with_python2:%py2_build}
%{?with_python3:%py3_build} %{?with_python3:%py3_build}
%install %install
%{?with_python3:%py3_install} %{?with_python3:%py3_install}
mv %{buildroot}/%{_bindir}/mako-render %{buildroot}/%{_bindir}/python3-mako-render mv %{buildroot}/%{_bindir}/mako-render %{buildroot}/%{_bindir}/python3-mako-render
%{?with_python2:%py2_install}
rm -rf doc/build rm -rf doc/build
%check %check
%{__python2} setup.py test
%{__python3} setup.py test %{__python3} setup.py test
%files -n python2-mako
%license LICENSE AUTHORS
%doc CHANGES README.* examples
%{_bindir}/mako-render
%{python2_sitelib}/*
%files -n python3-mako %files -n python3-mako
%license LICENSE AUTHORS %license LICENSE AUTHORS
%doc CHANGES README.* examples %doc CHANGES README.* examples
@ -85,6 +61,12 @@ rm -rf doc/build
%doc doc %doc doc
%changelog %changelog
* Sat Aug 8 2020 shixuantong <shixuantong@huawei.com> - 1.0.6-15
- Type:NA
- ID:NA
- SUG:NA
- DESC:remove python2 support
* Wed Jul 8 2020 xinghe<xinghe1@huawei.com> - 1.0.6-14 * Wed Jul 8 2020 xinghe<xinghe1@huawei.com> - 1.0.6-14
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA