%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %global pkgname Jinja Name: python-%{pkgname} Version: 1.2 Release: 1%{?dist} Summary: A sandboxed python templating engine Group: Development/Languages License: BSD URL: http://jinja.pocoo.org/1/ Source0: http://pypi.python.org/packages/source/J/Jinja/Jinja-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel BuildRequires: python-setuptools %description Jinja is a sandboxed template engine written in pure Python licensed under the BSD license. 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 %{pkgname}-%{version} sed -i -e 's|\r||' LICENSE %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT mv $RPM_BUILD_ROOT/usr/docs installed-docs %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc ./installed-docs/* LICENSE %{python_sitearch}/* %changelog * Sat Mar 21 2009 Conrad Meyer - 1.2-1 - Initial package.