File python-htmltmpl.spec of Package python-htmltmpl

#
# spec file for package python-htmltmpl
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-htmltmpl
Version:        1.22
Release:        0
Summary:        Templating engine for separation of code and HTML
License:        GPL-2.0-or-later
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:  %{python_module 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_build

%install
%python_install
install -Dpm 755 easy.py %{buildroot}%{_bindir}/easydoc
install -pm 755 tmpl-xgettext.pl %{buildroot}%{_bindir}
rm -f doc/makedoc.sh

#%%check
#%%pyunittest

%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
%pycache_only %{python_sitelib}/__pycache__

%changelog
openSUSE Build Service is sponsored by