Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(plat_specific=True)")}

Name:           python-cheetah
Version:        1.0
Release:        2%{?dist}
Summary:        Template engine and code-generator

Group:          Development/Libraries
License:        MIT
URL:            http://sourceforge.net/projects/cheetahtemplate
Source0:        http://download.sourceforge.net/cheetahtemplate/Cheetah-%{version}.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  python
BuildRequires:  python-devel

Requires:       python-abi = %(%{__python} -c "import sys ; print sys.version[:3]")

%description
Cheetah is a Python-powered template engine and code-generator.
It is similar to the Jakarta project's Velocity.

%prep
%setup -q -n Cheetah-%{version}

%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build

%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --root $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc CHANGES LICENSE README TODO

%{_bindir}/cheetah
%{_bindir}/cheetah-compile

%dir %{python_sitelib}/Cheetah
%{python_sitelib}/Cheetah/*.py
%{python_sitelib}/Cheetah/*.pyc
%{python_sitelib}/Cheetah/_namemapper.so
%ghost %{python_sitelib}/Cheetah/*.pyo

%dir %{python_sitelib}/Cheetah/Templates
%{python_sitelib}/Cheetah/Templates/*.py
%{python_sitelib}/Cheetah/Templates/*.pyc
%{python_sitelib}/Cheetah/Templates/*.tmpl
%ghost %{python_sitelib}/Cheetah/Templates/*.pyo

%dir %{python_sitelib}/Cheetah/Tests
%{python_sitelib}/Cheetah/Tests/*.py
%{python_sitelib}/Cheetah/Tests/*.pyc
%ghost %{python_sitelib}/Cheetah/Tests/*.pyo

%dir %{python_sitelib}/Cheetah/Tools
%{python_sitelib}/Cheetah/Tools/*.py
%{python_sitelib}/Cheetah/Tools/*.pyc
%{python_sitelib}/Cheetah/Tools/*.txt
%ghost %{python_sitelib}/Cheetah/Tools/*.pyo

%dir %{python_sitelib}/Cheetah/Utils
%{python_sitelib}/Cheetah/Utils/*.py
%{python_sitelib}/Cheetah/Utils/*.pyc
%ghost %{python_sitelib}/Cheetah/Utils/*.pyo

%dir %{python_sitelib}/Cheetah/Utils/optik
%{python_sitelib}/Cheetah/Utils/optik/*.py
%{python_sitelib}/Cheetah/Utils/optik/*.pyc
%ghost %{python_sitelib}/Cheetah/Utils/optik/*.pyo

%changelog
* Thu Feb 16 2006 Mike Bonnet <mikeb@redhat.com> - 1.0-2
- Rebuild for Fedora Extras 5

* Wed Dec  7 2005 Mike Bonnet <mikeb@redhat.com> - 1.0-1
- Initial version