%if 0%{?fedora} # kajiki upstream doesn't currently support python3.. # but when it does, flip this bit to '1' %global with_python3 0 %endif %global modname kajiki Name: python-kajiki Version: 0.3.5 Release: 1%{?dist} Summary: Really fast well-formed xml templates Group: Development/Libraries License: MIT URL: http://pypi.python.org/pypi/Kajiki Source0: http://pypi.python.org/packages/source/K/Kajiki/Kajiki-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: babel %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-babel %endif Requires: babel %description Are you tired of the slow performance of Genshi? But you still long for the assurance that your output is well-formed that you miss from all those other templating engines? Do you wish you had Jinja's blocks with Genshi's syntax? Then look no further, Kajiki is for you! Kajiki quickly compiles Genshi-like syntax to *real python bytecode* that renders with blazing-fast speed! Don't delay! Pick up your copy of Kajiki today! %if 0%{?with_python3} %package -n python3-kajiki Summary: Really fast well-formed xml templates Group: Development/Libraries Requires: python3-babel %description -n python3-kajiki Are you tired of the slow performance of Genshi? But you still long for the assurance that your output is well-formed that you miss from all those other templating engines? Do you wish you had Jinja's blocks with Genshi's syntax? Then look no further, Kajiki is for you! Kajiki quickly compiles Genshi-like syntax to *real python bytecode* that renders with blazing-fast speed! Don't delay! Pick up your copy of Kajiki today! %endif %prep %setup -q -n Kajiki-%{version} # Remove bundled egg-info in case it exists rm -rf Kajiki.egg-info %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif %build %{__python} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif %install %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root=%{buildroot} popd %endif %{__python} setup.py install -O1 --skip-build --root=%{buildroot} %check %{__python} setup.py test %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py test popd %endif %files %doc README PKG-INFO %{python_sitelib}/%{modname}/ %{python_sitelib}/Kajiki-%{version}* %if 0%{?with_python3} %files -n python3-kajiki %doc README PKG-INFO %{python3_sitelib}/%{modname}/ %{python3_sitelib}/Kajiki-%{version}-* %endif %changelog * Fri Feb 22 2013 Ralph Bean - 0.3.5-1 - initial package for Fedora