753bcf0
%if 0%{?fedora}
ba061ce
%global with_python3 1
c081131
%endif
c081131
c081131
%if 0%{?rhel} && 0%{?rhel} < 6
dd27b20
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
1390f0d
%endif
a14f36e
c081131
%if 0%{?fedora} <= 16
c081131
%{!?python3_version: %global python3_version %(%{__python3} -c 'import sys ; sys.stdout.write("%s.%s" % sys.version_info[:2])')}
c081131
%endif
c081131
a14f36e
Name: python-mako
Luke Macken debacfa
Version: 0.5.0
29630a5
Release: 5%{?dist}
a14f36e
Summary: Mako template library for Python
a14f36e
a14f36e
Group: Development/Languages
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)
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
c081131
BuildRequires: python2-devel
c081131
BuildRequires: python-setuptools
c081131
BuildRequires: python-markupsafe
c081131
BuildRequires: python-beaker
c081131
BuildRequires: python-nose
c081131
Requires: python-markupsafe
c081131
Requires: python-beaker
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
c081131
Requires: python3-beaker
c081131
Requires: 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.
c081131
c081131
This package contains the mako module built for use with python3.
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
c081131
rm -rf %{buildroot}
ba061ce
ba061ce
%if 0%{?with_python3}
ba061ce
pushd %{py3dir}
c081131
%{__python3} setup.py install --skip-build --root %{buildroot}
c081131
mv %{buildroot}/%{_bindir}/mako-render %{buildroot}/%{_bindir}/python3-mako-render
ba061ce
popd
ba061ce
%endif # with_python3
ba061ce
c081131
%{__python} setup.py install --skip-build --root %{buildroot}
a14f36e
c081131
# These are supporting files for building the docs.  No need to ship
1390f0d
rm -rf doc/build
659c910
659c910
%check
659c910
PYTHONPATH=$(pwd) nosetests
659c910
dd27b20
%if 0%{?with_python3} && 0%{?fedora} > 14
dd27b20
pushd %{py3dir}
c081131
PYTHONPATH=$(pwd) nosetests-%{python3_version}
dd27b20
popd
dd27b20
%endif
659c910
a14f36e
%clean
c081131
rm -rf %{buildroot}
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,-)
c081131
%doc CHANGES LICENSE README doc examples
ba061ce
%{_bindir}/python3-mako-render
ba061ce
%{python3_sitelib}/*
ba061ce
%endif
a14f36e
a14f36e
%changelog
29630a5
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.5.0-5
29630a5
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
29630a5
753bcf0
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 0.5.0-4
753bcf0
- remove rhel logic from with_python3 conditional
753bcf0
fb006ef
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-3
fb006ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
fb006ef
ca2dd0c
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-2
ca2dd0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ca2dd0c
Luke Macken debacfa
* Tue Dec 13 2011 Luke Macken <lmacken@redhat.com> - 0.5.0-1
Luke Macken debacfa
- Update to 0.5.0
Luke Macken debacfa
c081131
* Mon Sep 5 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.4.2-2
c081131
- Require beaker to run unittests since its required at runtime
c081131
- Fix license tag
c081131
c081131
* Mon Sep 5 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.4.2-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.