Blame SPECS/python-mako.spec

e916b3
%if 0%{?fedora} || 0%{?rhel} >= 8
e916b3
%bcond_without python3
e916b3
%else
e916b3
%bcond_with python3
e916b3
%endif
e916b3
e916b3
%if 0%{?rhel} > 7
e916b3
%bcond_with beaker_tests
e916b3
%bcond_with python2
e916b3
%else
e916b3
%bcond_without beaker_tests
e916b3
%bcond_without python2
e916b3
%endif
e916b3
e916b3
%global upname Mako
e916b3
e916b3
Name: python-mako
e916b3
Version: 1.0.6
0fa4d7
Release: 14%{?dist}
e916b3
BuildArch: noarch
e916b3
e916b3
# Mostly MIT, but _ast_util.py is Python licensed.
e916b3
# The documentation contains javascript for search licensed BSD or GPLv2
e916b3
License: (MIT and Python) and (BSD or GPLv2)
e916b3
Group: Development/Languages
e916b3
Summary: Mako template library for Python
e916b3
URL: http://www.makotemplates.org/
e916b3
Source0: https://bitbucket.org/zzzeek/mako/get/rel_%(echo %{version} | sed "s/\./_/g").tar.bz2
e916b3
0fa4d7
# https://bugzilla.redhat.com/show_bug.cgi?id=2133606
0fa4d7
Patch0:  python-mako-1.0.6-CVE-2022-40023.patch
0fa4d7
e916b3
%if %{with python2}
e916b3
BuildRequires: python2-devel
e916b3
BuildRequires: python2-pytest
e916b3
BuildRequires: python2-setuptools
e916b3
BuildRequires: python2-markupsafe
e916b3
BuildRequires: python2-nose
e916b3
BuildRequires: python2-mock
e916b3
e916b3
%if %{with beaker_tests}
e916b3
BuildRequires: python2-beaker
e916b3
%endif
e916b3
%endif #{with python2}
e916b3
e916b3
%if %{with python3}
e916b3
BuildRequires: python3-devel
e916b3
BuildRequires: python3-pytest
e916b3
BuildRequires: python3-setuptools
e916b3
BuildRequires: python3-markupsafe
e916b3
BuildRequires: python3-mock
e916b3
BuildRequires: python3-nose
e916b3
e916b3
%if %{with beaker_tests}
e916b3
BuildRequires: python3-beaker
e916b3
%endif
e916b3
%endif #{with python3}
e916b3
e916b3
%global _description\
e916b3
Mako is a template library written in Python. It provides a familiar, non-XML\
e916b3
syntax which compiles into Python modules for maximum performance. Mako's\
e916b3
syntax and API borrows from the best ideas of many others, including Django\
e916b3
templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded\
e916b3
Python (i.e. Python Server Page) language, which refines the familiar ideas of\
e916b3
componentized layout and inheritance to produce one of the most straightforward\
e916b3
and flexible models available, while also maintaining close ties to Python\
e916b3
calling and scoping semantics.
e916b3
e916b3
%description %_description
e916b3
e916b3
%if %{with python2}
e916b3
%package -n python2-mako
e916b3
Summary: %summary
e916b3
Requires: python2-markupsafe
e916b3
e916b3
# Beaker is the preferred caching backend, but is not strictly necessary
e916b3
Recommends: python2-beaker
e916b3
e916b3
%{?python_provide:%python_provide python2-mako}
e916b3
e916b3
%description -n python2-mako %_description
e916b3
%endif #{with python2}
e916b3
e916b3
%package doc
e916b3
Summary: Documentation for the Mako template library for Python
e916b3
Group: Documentation
e916b3
License: (MIT and Python) and (BSD or GPLv2)
e916b3
%if %{with python3}
e916b3
Requires:   python3-mako = %{version}-%{release}
e916b3
%else
e916b3
Requires:   python2-mako = %{version}-%{release}
e916b3
%endif #{with python3}
e916b3
e916b3
%description doc
e916b3
Mako is a template library written in Python. It provides a familiar, non-XML
e916b3
syntax which compiles into Python modules for maximum performance. Mako's
e916b3
syntax and API borrows from the best ideas of many others, including Django
e916b3
templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded
e916b3
Python (i.e. Python Server Page) language, which refines the familiar ideas of
e916b3
componentized layout and inheritance to produce one of the most straightforward
e916b3
and flexible models available, while also maintaining close ties to Python
e916b3
calling and scoping semantics.
e916b3
e916b3
This package contains documentation in text and HTML formats.
e916b3
e916b3
e916b3
%if %{with python3}
e916b3
%package -n python3-mako
e916b3
Summary: Mako template library for Python 3
e916b3
Group: Development/Languages
e916b3
Requires: python3-markupsafe
e916b3
e916b3
# Beaker is the preferred caching backend, but is not strictly necessary
e916b3
Recommends: python3-beaker
e916b3
e916b3
%{?python_provide:%python_provide python3-mako}
e916b3
e916b3
%if %{without python2}
e916b3
Obsoletes: python2-mako < %{version}-%{release}
e916b3
%endif #{without python2}
e916b3
e916b3
%description -n python3-mako
e916b3
Mako is a template library written in Python. It provides a familiar, non-XML
e916b3
syntax which compiles into Python modules for maximum performance. Mako's
e916b3
syntax and API borrows from the best ideas of many others, including Django
e916b3
templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded
e916b3
Python (i.e. Python Server Page) language, which refines the familiar ideas of
e916b3
componentized layout and inheritance to produce one of the most straightforward
e916b3
and flexible models available, while also maintaining close ties to Python
e916b3
calling and scoping semantics.
e916b3
e916b3
This package contains the mako module built for use with python3.
e916b3
%endif #{with python3}
e916b3
e916b3
%prep
0fa4d7
%autosetup -p1 -n zzzeek-mako-8e83c7561e3c
e916b3
e916b3
%build
e916b3
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
e916b3
%{?with_python2:%py2_build}
e916b3
%{?with_python3:%py3_build}
e916b3
e916b3
e916b3
%install
e916b3
%{?with_python3:%py3_install}
e916b3
e916b3
%if %{with python2}
e916b3
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
e916b3
mv %{buildroot}/%{_bindir}/mako-render %{buildroot}/%{_bindir}/python3-mako-render
e916b3
%endif
e916b3
e916b3
%{?with_python2:%py2_install}
e916b3
e916b3
# These are supporting files for building the docs.  No need to ship
e916b3
rm -rf doc/build
e916b3
e916b3
%check
e916b3
%if %{with python2}
e916b3
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
e916b3
%{__python2} setup.py test
e916b3
%endif #{with python2}
e916b3
e916b3
%if %{with python3}
e916b3
%{__python3} setup.py test
e916b3
%endif
e916b3
e916b3
%if %{with python2}
e916b3
%files -n python2-mako
e916b3
%license LICENSE
e916b3
%doc CHANGES README.rst examples
e916b3
%{_bindir}/mako-render
e916b3
%{python2_sitelib}/*
e916b3
%endif %{with python2}
e916b3
e916b3
%if %{with python3}
e916b3
%files -n python3-mako
e916b3
%license LICENSE
e916b3
%doc CHANGES README.rst examples
e916b3
%if %{with python2}
e916b3
%{_bindir}/python3-mako-render
e916b3
%else
e916b3
%{_bindir}/mako-render
e916b3
%endif
e916b3
%{python3_sitelib}/*
e916b3
%endif
e916b3
e916b3
%files doc
e916b3
%doc doc
e916b3
e916b3
e916b3
%changelog
0fa4d7
* Thu Nov 17 2022 David King <amigadave@amigadave.com> - 1.0.6-14
0fa4d7
- Fix CVE-2022-40023 (#2128977)
0fa4d7
e916b3
* Wed Jul 11 2018 Petr Viktorin <pviktori@redhat.com> - 1.0.6-13
e916b3
- Disable the Python 2 subpackage again
e916b3
  https://bugzilla.redhat.com/show_bug.cgi?id=1590397
e916b3
- Fix the Python2 workaround
e916b3
e916b3
* Mon Jun 25 2018 Petr Viktorin <pviktori@redhat.com> - 1.0.6-12
e916b3
- Allow Python 2 for build
e916b3
  see https://hurl.corp.redhat.com/rhel8-py2
e916b3
e916b3
* Mon Jun 18 2018 Petr Viktorin <pviktori@redhat.com> - 1.0.6-11
e916b3
- Add back the Python 2 subpackage (temporarily, for mesa build)
e916b3
  https://bugzilla.redhat.com/show_bug.cgi?id=1569193
e916b3
e916b3
* Mon Apr 16 2018 Petr Viktorin <pviktori@redhat.com> - 1.0.6-10
e916b3
- Remove python-beaker as a build dependency
e916b3
e916b3
* Wed Mar 28 2018 Petr Viktorin <pviktori@redhat.com> - 1.0.6-9
e916b3
- Make python-beaker an optional dependency
e916b3
- Add missing python_provide for python3-mako
e916b3
- Conditionalize the Python 2 subpackage
e916b3
- Modernize the specfile
e916b3
e916b3
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.0.6-8
e916b3
- Update Python 2 dependency declarations to new packaging standards
e916b3
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
e916b3
e916b3
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.6-7
e916b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e916b3
e916b3
* Wed Sep 27 2017 Troy Dawson <tdawson@redhat.com> - 1.0.6-6
e916b3
- Cleanup spec file conditionals
e916b3
e916b3
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.6-5
e916b3
- Python 2 binary package renamed to python2-mako
e916b3
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
e916b3
e916b3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.6-4
e916b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
e916b3
e916b3
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.6-3
e916b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e916b3
e916b3
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.0.6-2
e916b3
- Rebuild for Python 3.6
e916b3
e916b3
* Sat Dec 17 2016 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.0.6-1
e916b3
- Update to 1.0.6 (#1257376).
e916b3
- Mark LICENSE as the license.
e916b3
- Drop declaration of BuildRoot.
e916b3
- Drop use of 2to3 since upstream supports Python 3 now.
e916b3
e916b3
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-3
e916b3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
e916b3
e916b3
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-2
e916b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
e916b3
e916b3
* Thu Nov 12 2015 Kevin Fenzi <kevin@scrye.com> - 1.0.3-1
e916b3
- Update to 1.0.3
e916b3
e916b3
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-3
e916b3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
e916b3
e916b3
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
e916b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
e916b3
e916b3
* Wed Jan 28 2015 Matej Cepl <mcepl@redhat.com> - 1.0.1-1
e916b3
- Update to 1.0.1 (#1185339)
e916b3
e916b3
* Wed Jun 18 2014 Luke Macken <lmacken@redhat.com> - 1.0.0-1
e916b3
- Update to 1.0.0 (#1106453)
e916b3
- Add a BR on python-mock
e916b3
e916b3
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-4
e916b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
e916b3
e916b3
* Tue May 27 2014 Kalev Lember <kalevlember@gmail.com> - 0.9.1-3
e916b3
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
e916b3
e916b3
* Mon May 19 2014 Luke Macken <lmacken@redhat.com> - 0.9.1-2
e916b3
- Create a subpackage for the documentation (#1006259)
e916b3
e916b3
* Mon May 19 2014 Luke Macken <lmacken@redhat.com> - 0.9.1-1
e916b3
- Update to 0.9.1 (#967837)
e916b3
e916b3
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.3-2
e916b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
e916b3
e916b3
* Tue Apr  9 2013 Luke Macken <lmacken@redhat.com> - 0.7.3-1
e916b3
- Update to 0.7.3 (#784257)
e916b3
e916b3
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-6
e916b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
e916b3
e916b3
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.5.0-5
e916b3
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
e916b3
e916b3
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 0.5.0-4
e916b3
- remove rhel logic from with_python3 conditional
e916b3
e916b3
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-3
e916b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e916b3
e916b3
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-2
e916b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
e916b3
e916b3
* Tue Dec 13 2011 Luke Macken <lmacken@redhat.com> - 0.5.0-1
e916b3
- Update to 0.5.0
e916b3
e916b3
* Mon Sep 5 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.4.2-2
e916b3
- Require beaker to run unittests since its required at runtime
e916b3
- Fix license tag
e916b3
e916b3
* Mon Sep 5 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.4.2-1
e916b3
- Update to 0.4.2
e916b3
- Run unit tests on python3
e916b3
e916b3
* Thu Feb 24 2011 Luke Macken <lmacken@redhat.com> - 0.4.0-1
e916b3
- Update to 0.4.0 (#654779)
e916b3
e916b3
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.6-2
e916b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
e916b3
e916b3
* Wed Feb 02 2011 Luke Macken <lmacken@redhat.com> - 0.3.6-1
e916b3
- Update to 0.3.6
e916b3
- Remove 2to3 patch
e916b3
e916b3
* Wed Oct 27 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.3.5-2
e916b3
- Use a patch from Debian submitted upstream to convert to python3 syntax
e916b3
e916b3
* Thu Oct 21 2010 Luke Macken <lmacken@redhat.com> - 0.3.5-1
e916b3
- Update to 0.3.5 (#645063)
e916b3
e916b3
* Wed Aug 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.3.4-3
e916b3
- rebuild with python3.2
e916b3
  http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html
e916b3
e916b3
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.3.4-2
e916b3
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
e916b3
e916b3
* Sun Jun 27 2010 Kyle VanderBeek <kylev@kylev.com> - 0.3.4-1
e916b3
- Update to 0.3.4 security fix release
e916b3
- Fix missing python3-beaker dependency
e916b3
e916b3
* Sat Jun  5 2010 Kyle VanderBeek <kylev@kylev.com> - 0.3.3-1
e916b3
- Update to upstream 0.3.3
e916b3
e916b3
* Tue May  4 2010 David Malcolm <dmalcolm@redhat.com> - 0.3.2-2
e916b3
- add python3 subpackage
e916b3
e916b3
* Tue May 04 2010 Luke Macken <lmacken@redhat.com> - 0.3.2-1
e916b3
- Update to 0.3.2
e916b3
- Run the test suite in %%check
e916b3
e916b3
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.4-3
e916b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
e916b3
e916b3
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.4-2
e916b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
e916b3
e916b3
* Tue Jan 06 2009 Luke Macken <lmacken@redhat.com> - 0.2.4-1
e916b3
- Update to 0.2.4
e916b3
e916b3
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.1.10-3
e916b3
- Rebuild for Python 2.6
e916b3
e916b3
* Sun May 11 2008 Kyle VanderBeek <kylev@kylev.com> - 0.1.10-2
e916b3
- Fix rpmlint warnings.
e916b3
- Add docs and examples.
e916b3
e916b3
* Wed Apr  9 2008 Kyle VanderBeek <kylev@kylev.com> - 0.1.10-1
e916b3
- Initial version.