dd27b20
%if 0%{?fedora} || 0%{?rhel} > 6
ba061ce
%global with_python3 1
1390f0d
%else
dd27b20
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
1390f0d
%endif
a14f36e
a14f36e
Name: python-mako
dd27b20
Version: 0.4.2
Luke Macken 3ad00cd
Release: 1%{?dist}
a14f36e
Summary: Mako template library for Python
a14f36e
a14f36e
Group: Development/Languages
1390f0d
# Mostly MIT, but _ast_util.py is Python licensed.
1390f0d
License: MIT and Python
a14f36e
URL: http://www.makotemplates.org/
a14f36e
Source0: http://www.makotemplates.org/downloads/Mako-%{version}.tar.gz
a14f36e
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
a14f36e
BuildArch: noarch
dd27b20
BuildRequires: python-setuptools python-nose python-markupsafe
1390f0d
Requires: python-beaker python-markupsafe
a14f36e
ba061ce
%if 0%{?with_python3}
ba061ce
BuildRequires: python3-devel
ba061ce
BuildRequires: python3-setuptools
1390f0d
BuildRequires: python3-markupsafe
2ca0168
BuildRequires: python3-beaker
dd27b20
%if 0%{?fedora} > 14
dd27b20
BuildRequires: python3-nose
dd27b20
%endif
ba061ce
BuildRequires: /usr/bin/2to3
ba061ce
%endif # if with_python3
ba061ce
a14f36e
%description
a14f36e
Mako is a template library written in Python. It provides a familiar, non-XML
a14f36e
syntax which compiles into Python modules for maximum performance. Mako's
a14f36e
syntax and API borrows from the best ideas of many others, including Django
a14f36e
templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded
a14f36e
Python (i.e. Python Server Page) language, which refines the familiar ideas of
a14f36e
componentized layout and inheritance to produce one of the most straightforward
a14f36e
and flexible models available, while also maintaining close ties to Python
a14f36e
calling and scoping semantics.
a14f36e
ba061ce
%if 0%{?with_python3}
ba061ce
%package -n python3-mako
ba061ce
Summary: Mako template library for Python 3
ba061ce
Group: Development/Languages
1390f0d
Requires: python3-beaker python3-markupsafe
ba061ce
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.
ba061ce
%endif # with_python3
a14f36e
a14f36e
%prep
a14f36e
%setup -q -n Mako-%{version}
a14f36e
ba061ce
%if 0%{?with_python3}
ba061ce
rm -rf %{py3dir}
ba061ce
cp -a . %{py3dir}
ba061ce
%endif # with_python3
a14f36e
a14f36e
%build
a14f36e
%{__python} setup.py build
a14f36e
ba061ce
%if 0%{?with_python3}
ba061ce
pushd %{py3dir}
dd27b20
2to3 --no-diffs -w mako test
ba061ce
%{__python3} setup.py build
ba061ce
popd
ba061ce
%endif # with_python3
ba061ce
a14f36e
a14f36e
%install
a14f36e
rm -rf $RPM_BUILD_ROOT
ba061ce
ba061ce
%if 0%{?with_python3}
ba061ce
pushd %{py3dir}
dd27b20
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
ba061ce
mv $RPM_BUILD_ROOT/%{_bindir}/mako-render $RPM_BUILD_ROOT/%{_bindir}/python3-mako-render
ba061ce
popd
ba061ce
%endif # with_python3
ba061ce
dd27b20
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
a14f36e
1390f0d
# These are supporting files for building the docs.  Also, they
1390f0d
# contain files licensed GPLv2 or BSD which confuses the licensing
1390f0d
# situation.  Just don't ship them.
1390f0d
rm -rf doc/build
659c910
659c910
%check
659c910
PYTHONPATH=$(pwd) nosetests
659c910
dd27b20
%if 0%{?with_python3} && 0%{?fedora} > 14
dd27b20
pushd %{py3dir}
dd27b20
PYTHONPATH=$(pwd) nosetests-3.2
dd27b20
popd
dd27b20
%endif
659c910
a14f36e
%clean
a14f36e
rm -rf $RPM_BUILD_ROOT
a14f36e
a14f36e
a14f36e
%files
a14f36e
%defattr(-,root,root,-)
a14f36e
%doc CHANGES LICENSE README doc examples
0707ff2
%{_bindir}/mako-render
a14f36e
%{python_sitelib}/*
a14f36e
ba061ce
%if 0%{?with_python3}
ba061ce
%files -n python3-mako
ba061ce
%defattr(-,root,root,-)
ba061ce
%{_bindir}/python3-mako-render
ba061ce
%{python3_sitelib}/*
ba061ce
%endif
a14f36e
a14f36e
%changelog
dd27b20
* Mon Sep 5 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.4.1-1
dd27b20
- Update to 0.4.2
dd27b20
- Run unit tests on python3
dd27b20
Luke Macken 3ad00cd
* Thu Feb 24 2011 Luke Macken <lmacken@redhat.com> - 0.4.0-1
Luke Macken 3ad00cd
- Update to 0.4.0 (#654779)
Luke Macken 3ad00cd
82d04d2
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.6-2
82d04d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
82d04d2
Luke Macken 738c1c5
* Wed Feb 02 2011 Luke Macken <lmacken@redhat.com> - 0.3.6-1
Luke Macken 738c1c5
- Update to 0.3.6
Luke Macken 738c1c5
- Remove 2to3 patch
Luke Macken 738c1c5
cc6a224
* Wed Oct 27 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.3.5-2
cc6a224
- Use a patch from Debian submitted upstream to convert to python3 syntax
cc6a224
Luke Macken 66efba4
* Thu Oct 21 2010 Luke Macken <lmacken@redhat.com> - 0.3.5-1
Luke Macken 66efba4
- Update to 0.3.5 (#645063)
Luke Macken 66efba4
a5813b6
* Wed Aug 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.3.4-3
a5813b6
- rebuild with python3.2
a5813b6
  http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html
a5813b6
be25a02
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.3.4-2
be25a02
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
be25a02
1390f0d
* Sun Jun 27 2010 Kyle VanderBeek <kylev@kylev.com> - 0.3.4-1
1390f0d
- Update to 0.3.4 security fix release
1390f0d
- Fix missing python3-beaker dependency
1390f0d
c06d6d2
* Sat Jun  5 2010 Kyle VanderBeek <kylev@kylev.com> - 0.3.3-1
c06d6d2
- Update to upstream 0.3.3
c06d6d2
ba061ce
* Tue May  4 2010 David Malcolm <dmalcolm@redhat.com> - 0.3.2-2
ba061ce
- add python3 subpackage
ba061ce
659c910
* Tue May 04 2010 Luke Macken <lmacken@redhat.com> - 0.3.2-1
659c910
- Update to 0.3.2
659c910
- Run the test suite in %%check
659c910
b432923
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.4-3
b432923
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
b432923
90a4b5b
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.4-2
90a4b5b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
90a4b5b
0707ff2
* Tue Jan 06 2009 Luke Macken <lmacken@redhat.com> - 0.2.4-1
0707ff2
- Update to 0.2.4
0707ff2
556c18c
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.1.10-3
556c18c
- Rebuild for Python 2.6
556c18c
a14f36e
* Sun May 11 2008 Kyle VanderBeek <kylev@kylev.com> - 0.1.10-2
a14f36e
- Fix rpmlint warnings.
a14f36e
- Add docs and examples.
a14f36e
a14f36e
* Wed Apr  9 2008 Kyle VanderBeek <kylev@kylev.com> - 0.1.10-1
a14f36e
- Initial version.