%global with_python3 0 Name: pystache Version: 0.5.3 Release: 2%{?dist} Summary: Mustache for Python License: MIT URL: http://pypi.python.org/pypi/%{name}/ Source0: http://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools # For the test BuildRequires: python-simplejson Requires: python-simplejson %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools # For the test BuildRequires: python3-simplejson Requires: python3-simplejson %endif # if with_python3 %description Inspired by ctemplate and et, Mustache is a framework-agnostic way to render logic-free views. As ctemplates says, "It emphasizes separating logic from presentation: it is impossible to embed application logic in this template language." %if 0%{?with_python3} %package -n python3-pystache Group: Applications/System Summary: Mustache for Python %description -n python3-pystache Inspired by ctemplate and et, Mustache is a framework-agnostic way to render logic-free views. As ctemplates says, "It emphasizes separating logic from presentation: it is impossible to embed application logic in this template language." %endif # with_python3 %prep %setup -q rm -fvr pystache.egg-info %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' %endif # with_python3 %build %{__python} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif # with_python3 %install rm -rf $RPM_BUILD_ROOT %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT popd %endif # with_python3 %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %check %{__python} -m pystache.commands.test # tests fail for py3 for some reason #%if 0%{?with_python3} #pushd %{py3dir} #%{__python3} -m pystache.commands.test #popd #%endif # with_python3 %files %doc PKG-INFO HISTORY.md README.md LICENSE %{python_sitelib}/%{name}/ %{python_sitelib}/%{name}-%{version}-py?.?.egg-info %{_bindir}/%{name}* %if 0%{?with_python3} %files -n python3-pystache %doc PKG-INFO HISTORY.md README.md LICENSE %{python3_sitelib}/%{name}/ %{python3_sitelib}/%{name}-%{version}-py?.?.egg-info %endif # with_python3 %changelog * Sun May 19 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.5.3-2 - Disable py3 support for F18 since python3-simplejson isn't available * Sun May 19 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.5.3-1 - Update to 0.5.3 - Add py3 support * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Fri Oct 12 2012 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.5.2-1 - Update to latest upstream version #864264 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri Jan 06 2012 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.3.1-2 - spec bump for gcc 4.7 rebuild * Wed Oct 26 2011 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.3.1-1 Initial rpmbuild