5846ba7
%if 0%{?fedora} || 0%{?rhel} >= 8
33ca828
%bcond_without python3
33ca828
%else
33ca828
%bcond_with python3
c081131
%endif
c081131
654d113
%if 0%{?rhel} > 7
654d113
%bcond_with python2
654d113
%else
654d113
%bcond_without python2
654d113
%endif
654d113
3850112
%global upname Mako
3850112
a14f36e
Name: python-mako
dd15afd
Version: 1.0.12
0665975
Release: 4%{?dist}
bcf5d0d
BuildArch: noarch
a14f36e
1390f0d
# Mostly MIT, but _ast_util.py is Python licensed.
c081131
# The documentation contains javascript for search licensed BSD or GPLv2
c081131
License: (MIT and Python) and (BSD or GPLv2)
bcf5d0d
Summary: Mako template library for Python
a14f36e
URL: http://www.makotemplates.org/
2c575d6
Source0: https://github.com/sqlalchemy/mako/archive/rel_%(echo %{version} | sed "s/\./_/g").tar.gz
bcf5d0d
654d113
%if %{with python2}
c081131
BuildRequires: python2-devel
bcf5d0d
BuildRequires: python2-pytest
ca96cca
BuildRequires: python2-setuptools
ca96cca
BuildRequires: python2-markupsafe
43a435e
#BuildRequires: python2-beaker
ca96cca
BuildRequires: python2-nose
ca96cca
BuildRequires: python2-mock
654d113
%endif #{with python2}
a14f36e
33ca828
%if %{with python3}
ba061ce
BuildRequires: python3-devel
bcf5d0d
BuildRequires: python3-pytest
ba061ce
BuildRequires: python3-setuptools
1390f0d
BuildRequires: python3-markupsafe
43a435e
#BuildRequires: python3-beaker
Luke Macken 005ebf3
BuildRequires: python3-mock
dd27b20
BuildRequires: python3-nose
33ca828
%endif #{with python3}
ba061ce
6dd6fa9
%global _description\
6dd6fa9
Mako is a template library written in Python. It provides a familiar, non-XML\
6dd6fa9
syntax which compiles into Python modules for maximum performance. Mako's\
6dd6fa9
syntax and API borrows from the best ideas of many others, including Django\
6dd6fa9
templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded\
6dd6fa9
Python (i.e. Python Server Page) language, which refines the familiar ideas of\
6dd6fa9
componentized layout and inheritance to produce one of the most straightforward\
6dd6fa9
and flexible models available, while also maintaining close ties to Python\
a14f36e
calling and scoping semantics.
a14f36e
6dd6fa9
%description %_description
6dd6fa9
654d113
%if %{with python2}
6dd6fa9
%package -n python2-mako
6dd6fa9
Summary: %summary
ca96cca
Requires: python2-markupsafe
456d72d
456d72d
# Beaker is the preferred caching backend, but is not strictly necessary
456d72d
Recommends: python2-beaker
456d72d
6dd6fa9
%{?python_provide:%python_provide python2-mako}
6dd6fa9
6dd6fa9
%description -n python2-mako %_description
654d113
%endif #{with python2}
6dd6fa9
Luke Macken d71c923
%package doc
Luke Macken d71c923
Summary: Documentation for the Mako template library for Python
Luke Macken d71c923
License: (MIT and Python) and (BSD or GPLv2)
5402525
%if %{with python3}
5402525
Requires:   python3-mako = %{version}-%{release}
5402525
%else
ca96cca
Requires:   python2-mako = %{version}-%{release}
5402525
%endif #{with python3}
Luke Macken d71c923
Luke Macken d71c923
%description doc
Luke Macken d71c923
Mako is a template library written in Python. It provides a familiar, non-XML
Luke Macken d71c923
syntax which compiles into Python modules for maximum performance. Mako's
Luke Macken d71c923
syntax and API borrows from the best ideas of many others, including Django
Luke Macken d71c923
templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded
Luke Macken d71c923
Python (i.e. Python Server Page) language, which refines the familiar ideas of
Luke Macken d71c923
componentized layout and inheritance to produce one of the most straightforward
Luke Macken d71c923
and flexible models available, while also maintaining close ties to Python
Luke Macken d71c923
calling and scoping semantics.
Luke Macken d71c923
Luke Macken d71c923
This package contains documentation in text and HTML formats.
Luke Macken d71c923
Luke Macken d71c923
33ca828
%if %{with python3}
ba061ce
%package -n python3-mako
ba061ce
Summary: Mako template library for Python 3
c081131
Requires: python3-markupsafe
ba061ce
456d72d
# Beaker is the preferred caching backend, but is not strictly necessary
456d72d
Recommends: python3-beaker
456d72d
d0221b8
%{?python_provide:%python_provide python3-mako}
d0221b8
654d113
%if %{without python2}
654d113
Obsoletes: python2-mako < %{version}-%{release}
5402525
%endif #{without python2}
654d113
ba061ce
%description -n python3-mako
ba061ce
Mako is a template library written in Python. It provides a familiar, non-XML
ba061ce
syntax which compiles into Python modules for maximum performance. Mako's
ba061ce
syntax and API borrows from the best ideas of many others, including Django
ba061ce
templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded
ba061ce
Python (i.e. Python Server Page) language, which refines the familiar ideas of
ba061ce
componentized layout and inheritance to produce one of the most straightforward
ba061ce
and flexible models available, while also maintaining close ties to Python
ba061ce
calling and scoping semantics.
c081131
c081131
This package contains the mako module built for use with python3.
33ca828
%endif #{with python3}
a14f36e
a14f36e
%prep
2c575d6
%autosetup -n mako-rel_%(echo %{version} | sed "s/\./_/g")
2c575d6
a14f36e
a14f36e
%build
33ca828
%{?with_python2:%py2_build}
33ca828
%{?with_python3:%py3_build}
ba061ce
a14f36e
a14f36e
%install
33ca828
%{?with_python3:%py3_install}
ba061ce
654d113
%if %{with python2}
c081131
mv %{buildroot}/%{_bindir}/mako-render %{buildroot}/%{_bindir}/python3-mako-render
654d113
%endif
ba061ce
33ca828
%{?with_python2:%py2_install}
a14f36e
c081131
# These are supporting files for building the docs.  No need to ship
1390f0d
rm -rf doc/build
659c910
659c910
%check
654d113
%if %{with python2}
33ca828
%{__python2} setup.py test
654d113
%endif #{with python2}
659c910
33ca828
%if %{with python3}
33ca828
%{__python3} setup.py test
dd27b20
%endif
659c910
654d113
%if %{with python2}
6dd6fa9
%files -n python2-mako
bcf5d0d
%license LICENSE
bcf5d0d
%doc CHANGES README.rst examples
0707ff2
%{_bindir}/mako-render
33ca828
%{python2_sitelib}/*
654d113
%endif %{with python2}
a14f36e
5402525
%if %{with python3}
ba061ce
%files -n python3-mako
bcf5d0d
%license LICENSE
bcf5d0d
%doc CHANGES README.rst examples
654d113
%if %{with python2}
ba061ce
%{_bindir}/python3-mako-render
654d113
%else
654d113
%{_bindir}/mako-render
654d113
%endif
ba061ce
%{python3_sitelib}/*
ba061ce
%endif
a14f36e
Luke Macken d71c923
%files doc
Luke Macken d71c923
%doc doc
Luke Macken d71c923
Luke Macken d71c923
a14f36e
%changelog
0665975
* Sun Aug 18 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.12-4
0665975
- Rebuilt for Python 3.8
0665975
8b3c39e
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.12-3
8b3c39e
- Rebuilt for Python 3.8
8b3c39e
28773d1
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.12-2
28773d1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
28773d1
dd15afd
* Wed Jun 05 2019 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.0.12-1
dd15afd
- Update to 1.0.12 (#1708706).
dd15afd
- https://docs.makotemplates.org/en/latest/changelog.html#change-1.0.12
dd15afd
ffc7e7b
* Wed Apr 17 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.9-1
ffc7e7b
- Update to 1.0.9 (#1698191, #1700055)
ffc7e7b
2c575d6
* Wed Mar 20 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.8-1
2c575d6
- Update to 1.0.8 (#1470902, #1690902)
2c575d6
73b4040
* Wed Mar 20 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.7-1
73b4040
- Update to 1.0.7 (#1470902)
73b4040
3fd6360
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.6-12
3fd6360
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
3fd6360
f462720
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.6-11
f462720
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
f462720
00a7ee7
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.6-10
00a7ee7
- Rebuilt for Python 3.7
00a7ee7
456d72d
* Wed Mar 28 2018 Petr Viktorin <pviktori@redhat.com> - 1.0.6-9
456d72d
- Make python-beaker an optional dependency
d0221b8
- Add missing python_provide for python3-mako
654d113
- Conditionalize the Python 2 subpackage
33ca828
- Modernize the specfile
456d72d
ca96cca
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.0.6-8
ca96cca
- Update Python 2 dependency declarations to new packaging standards
ca96cca
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
ca96cca
b3c2350
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.6-7
b3c2350
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild