%global _empty_manifest_terminate_build 0
%bcond_without test
Name: python-mako
Version: 1.4.3
Release: 1
Summary: Mako template library for Python
License: MIT
Group: Development/Languages
URL: https://www.makotemplates.org/
Source0: %{pypi_source mako}
BuildArch: noarch
Requires: python3-markupsafe
Requires: python3-mako = %{version}-%{release}
%description
Python-mako is a template library for Python. It provides a familiar, non-XML
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,
Cheetah, Myghty, and Genshi.
%package -n python3-mako
Summary: Mako library for Python 3
Provides: python-mako = %{version}-%{release}
BuildRequires: python3-devel python3-setuptools
BuildRequires: python3-markupsafe python3-mock
BuildRequires: python3-pytest
%description -n python3-mako
Mako library for Python 3.
%package help
Summary: Help file of Mako library for Python
Provides: python3-mako-doc
%description help
Help file of Mako library for Python in text and HTML formats.
%prep
%autosetup -n mako-%{version}
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%check
%pytest
%files -n python3-mako -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Mon Oct 05 2026 Funda Wang <fundawang@yeah.net> - 1.4.3-1
- update to 1.4.3
* Sun Sep 20 2026 Hao Nan <dev01210@linx-info.com> - 1.4.1-1
- update to 1.4.1
* Thu May 07 2026 infra_team <zhaiwenjie1@huawei.com> - 1.3.12-1
- update version to 1.3.12
* Fix CVE-2026-44307 (Windows backslash path traversal vulnerability in TemplateLookup)
* Fri Apr 24 2026 YangengLiu <dev01202@linx-info.com> - 1.3.11-1
- update version to 1.3.11
* Fix CVE-2026-41205 (Path traversal via double-slash URI prefix in TemplateLookup)
* Tue Aug 05 2025 zengliwen <zengliwen@kylinos.cn> - 1.3.10-1
- Update to 1.3.10-1
- Fix undefined variable errors when strict_undefined=True when using a nested list comprehension. Pull request courtesy Sébastien Granjoux.
Fixed test suite to not rely upon ancient “future division” statement to test the Template.future_imports feature. The test is replaced with one that tests only the rendering, not the ultimate effect.
* Mon Nov 04 2024 xiaozai <xiaozai@kylinos.cn> - 1.3.6-1
- Upgrade version to 1.3.6
Fixed long standing bug where the sequence <& would be misinterpreted by the lexer.
It’s not clear why the ampersand character was part of the characters being consumed
here and it may have been an inadvertent bit of code from one of Mako’s predecessor languages.
* Tue Aug 06 2024 lixiaoyong <lixiaoyong@kylinos.cn> - 1.3.5-1
- Upgrade version to 1.3.5
Fixed unexpected error when use control lines which the first control block with no bodies other than comments
Fixed unexpected syntax error in strict_undefined mode that occurred when using comprehensions within a function in a Mako Python code block
Mako 1.3.0 bumps the minimum Python version to 3.8
* Wed Feb 15 2023 wangjunqi <wangjunqi@kylinos.cn> - 1.2.4-2
- enable check
* Fri Nov 18 2022 wangjunqi <wangjunqi@kylinos.cn> - 1.2.4-1
- Update package to version 1.2.4
* Wed Sep 21 2022 dillon chen <dilon.chen@gmal.com> 1.2.2-1
- update to 1.2.2
* Wed Mar 30 2022 wangjiang <wangjiang37@h-partners.com> 1.1.4-4
- remove python-nose build required
* Wed Feb 23 2022 yuanxin <yuanxin24@h-partners.com> - 1.1.4-3
- enable %check
* Sat Nov 27 2021 shixuantong <shixuantong@huawei.com> - 1.1.4-2
- disable %check
* Thu Jul 15 2021 huangtianhua <huangtianhua@huawei.com> 1.1.4-1
- Upgrade to 1.1.4 to support OpenStack-W
* Sat Mar 13 2021 shixuantong <shixuantong@huawei.com> - 1.1.3-2
- fix failure to build locally using rpmbuild
* Tue Feb 2 2021 wangjie<wangjie294@huawei.com> - 1.1.3-1
- upgrade version to 1.1.3
* Tue Jan 19 2021 tianwei <tianwei12@huawei.com> - 1.0.6-16
- Type:NA
- ID:NA
- SUG:NA
- DESC:fix pytest setup.cfg fail in make check
* 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
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Use Constant.value
* 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
- Type:NA
- ID:NA
- SUG:NA
- DESC:Package Init