File python-cheetah.spec of Package python-cheetah

#
# spec file for package python-cheetah
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

%define modname cheetah

Name:           python-%{modname}
Version:        2.2.2
Release:        1
Summary:        Python-Powered Template Engine
Url:            http://www.cheetahtemplate.org/
License:        Other License(s), see package
Group:          Development/Libraries/Python
Source:         Cheetah-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1030
%{py_requires}
%endif
BuildRequires:  python-devel

%description
Cheetah is a template engine and code generation tool, written in Python. Web
development is its principle use, but Cheetah is very flexible and is also
being used to generate C++ game code, Java, sql, form emails and even Python
code.

Authors:
--------
    Tavis Rudd <cheetahtemplate-discuss@lists.sf.net>

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

%build
export CFLAGS="$RPM_OPT_FLAGS"
python setup.py build

%install
%if 0%{?suse_version} >= 1030
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES
#%fdupes %buildroot
%else
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT
%endif

%clean
rm -rf %{buildroot}

%if 0%{?suse_version} >= 1030

%files -f INSTALLED_FILES
%else

%files
%endif
%defattr(-,root,root)
%doc CHANGES LICENSE README TODO
%if 0%{?suse_version} <= 0
%{_bindir}/*
%{python_sitelib}*
%endif

%changelog
openSUSE Build Service is sponsored by