File python-htmltmpl.spec of Package python-htmltmpl

#
# spec file for package python-htmltmpl
#
# Copyright (c) 2013 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: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}

Name:           python-htmltmpl
Version:        1.22
Release:        0
Summary:        Templating engine for separation of code and HTML
License:        GPL-2.0+
Group:          Development/Libraries/Python
Url:            http://htmltmpl.sourceforge.net/
Source0:        htmltmpl-%{version}.tar.bz2
Patch0:         %{name}-1.22-performance.patch
Patch1:         %{name}-1.22-docs.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  -post-build-checks
BuildRequires:  python
BuildRequires:  python-devel
Requires:       python
Requires:       python-xml
Provides:       htmltmpl = %{version}-%{release}

%description
The purpose of the templating engine is to provide web application developers, 
who need to separate program code and design (HTML code) of their web application 
projects, with a templating tool that can be easily used by cooperating 
webdesigners who have no programming skills.
This package includes easydoc, a module which uses the templating engine to generate 
HTML documentation from docstrings embedded in source files of Python modules.

%prep
%setup -q -n htmltmpl-%{version}
%patch0 -p0
%patch1 -p0

%build
%{__python} setup.py build

%install
%{__python} setup.py install -O1 --skip-build --prefix=%{_prefix} --root=%{buildroot} 
install -Dpm 755 easy.py %{buildroot}%{_bindir}/easydoc
install -pm 755 tmpl-xgettext.pl %{buildroot}%{_bindir}
rm -f doc/makedoc.sh

%check
%{__python} test.py

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc Changes LICENSE PKG-INFO README TODO VERSION doc/
%{_bindir}/easydoc
%{_bindir}/tmpl-xgettext.pl
%{python_sitelib}/easydoc*.py*
%{python_sitelib}/htmltmpl.py*
%if 0%{?suse_version} >= 1030
%{python_sitelib}/htmltmpl-1.22-py*.egg-info
%endif

%changelog
openSUSE Build Service is sponsored by