File python-Mako.spec of Package python-Mako

# spec file for package python-Mako
# Copyright (c) 2018 SUSE LINUX 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

%define oldpython python
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-Mako
Version:        1.0.7
Release:        0
Summary:        A Python templating language
License:        MIT
Group:          Development/Languages/Python
BuildRequires:  %{python_module MarkupSafe}
BuildRequires:  %{python_module mock}
BuildRequires:  %{python_module pbr}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-MarkupSafe
BuildArch:      noarch
%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24
Recommends:     python-Beaker >= 1.1
Provides:       %{oldpython}-mako = %{version}
Obsoletes:      %{oldpython}-mako < %{version}
Provides:       python3-mako = %{version}
Obsoletes:      python3-mako < %{version}

Mako is a template library written in Python. It provides a non-XML
syntax which compiles into Python modules for performance. Mako's
syntax and API borrows from Django templates, Cheetah, Myghty, and
Genshi. Conceptually, Mako is an embedded Python (i.e. Python Server
Page) language, which refines the ideas of componentized layout and
inheritance, while maintaining close ties to Python calling and
scoping semantics.

%setup -q -n Mako-%{version}


%python_expand %fdupes -s %{buildroot}%{$python_sitelib}

%python_exec test

%files %{python_files}
%license LICENSE
%doc examples
%python3_only %{_bindir}/mako-render