python-mako/python-mako.spec

133 lines
3.9 KiB
RPMSpec
Raw Normal View History

2010-05-06 17:26:04 +00:00
%global with_python3 1
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: python-mako
2010-06-05 21:26:07 +00:00
Version: 0.3.3
Release: 1%{?dist}
Summary: Mako template library for Python
Group: Development/Languages
License: MIT
URL: http://www.makotemplates.org/
Source0: http://www.makotemplates.org/downloads/Mako-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-setuptools-devel python-nose
Requires: python-beaker
2010-05-06 17:26:04 +00:00
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: /usr/bin/2to3
%endif # if with_python3
%description
Mako is a template library written in 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. Conceptually, Mako is an embedded
Python (i.e. Python Server Page) language, which refines the familiar ideas of
componentized layout and inheritance to produce one of the most straightforward
and flexible models available, while also maintaining close ties to Python
calling and scoping semantics.
2010-05-06 17:26:04 +00:00
%if 0%{?with_python3}
%package -n python3-mako
Summary: Mako template library for Python 3
Group: Development/Languages
%description -n python3-mako
Mako is a template library written in 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. Conceptually, Mako is an embedded
Python (i.e. Python Server Page) language, which refines the familiar ideas of
componentized layout and inheritance to produce one of the most straightforward
and flexible models available, while also maintaining close ties to Python
calling and scoping semantics.
%endif # with_python3
%prep
%setup -q -n Mako-%{version}
2010-05-06 17:26:04 +00:00
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
2to3 --write --nobackups %{py3dir} %{py3dir}/scripts/mako-render
%endif # with_python3
%build
%{__python} setup.py build
2010-05-06 17:26:04 +00:00
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif # with_python3
%install
rm -rf $RPM_BUILD_ROOT
2010-05-06 17:26:04 +00:00
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
mv $RPM_BUILD_ROOT/%{_bindir}/mako-render $RPM_BUILD_ROOT/%{_bindir}/python3-mako-render
popd
%endif # with_python3
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%check
PYTHONPATH=$(pwd) nosetests
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc CHANGES LICENSE README doc examples
2009-01-07 05:03:13 +00:00
%{_bindir}/mako-render
%{python_sitelib}/*
2010-05-06 17:26:04 +00:00
%if 0%{?with_python3}
%files -n python3-mako
%defattr(-,root,root,-)
%{_bindir}/python3-mako-render
%{python3_sitelib}/*
%endif
%changelog
2010-06-05 21:26:07 +00:00
* Sat Jun 5 2010 Kyle VanderBeek <kylev@kylev.com> - 0.3.3-1
- Update to upstream 0.3.3
2010-05-06 17:26:04 +00:00
* Tue May 4 2010 David Malcolm <dmalcolm@redhat.com> - 0.3.2-2
- add python3 subpackage
* Tue May 04 2010 Luke Macken <lmacken@redhat.com> - 0.3.2-1
- Update to 0.3.2
- Run the test suite in %%check
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
2009-01-07 05:03:13 +00:00
* Tue Jan 06 2009 Luke Macken <lmacken@redhat.com> - 0.2.4-1
- Update to 0.2.4
2008-11-29 15:36:08 +00:00
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.1.10-3
- Rebuild for Python 2.6
* Sun May 11 2008 Kyle VanderBeek <kylev@kylev.com> - 0.1.10-2
- Fix rpmlint warnings.
- Add docs and examples.
* Wed Apr 9 2008 Kyle VanderBeek <kylev@kylev.com> - 0.1.10-1
- Initial version.