%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: python-jinja Version: 1.2 Release: 1%{?dist} Summary: Sandboxed template engine Group: Development/Languages License: BSD URL: http://jinja.pocoo.org/ Source0: http://pypi.python.org/packages/source/J/Jinja/Jinja-%{version}.tar.gz Patch0: %{name}-docs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel %if 0%{?fedora} >= 8 BuildRequires: python-setuptools-devel %else BuildRequires: python-setuptools %endif %description Jinja is a sandboxed template engine written in pure Python. It provides a Django-like non-XML syntax and compiles templates into executable python code. It's basically a combination of Django templates and python code. %prep %setup -q -n Jinja-%{version} %patch0 -p0 -b .docs %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install rm -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT # fix EOL sed -i 's|\r$||g' LICENSE %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc AUTHORS CHANGES LICENSE TODO docs/html %{python_sitearch}/* %changelog * Tue Mar 11 2008 Thomas Moschny - 1.2-1 - Initial build.