File python-rst.linker.spec of Package python-rst.linker

#
# spec file for package python-rst.linker
#
# Copyright (c) 2017 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 http://bugs.opensuse.org/
#


%define _name   rst.linker
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-rst.linker
Version:        1.9
Release:        0
Summary:        Changelog link and timestamp adding Sphinx plugin
License:        MIT
Group:          Development/Languages/Python
Url:            https://github.com/jaraco/rst.linker
Source:         https://files.pythonhosted.org/packages/source/r/%{_name}/%{_name}-%{version}.tar.gz
BuildRequires:  %{python_module Sphinx}
BuildRequires:  %{python_module base}
BuildRequires:  %{python_module path.py}
BuildRequires:  %{python_module pytest-runner}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module python-dateutil}
BuildRequires:  %{python_module setuptools_scm}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module six}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-python-dateutil
Requires:       python-six
BuildArch:      noarch
%python_subpackages

%description
rst.linker is a Sphinx plugin to add links and timestamps to the
changelog.

%prep
%setup -q -n %{_name}-%{version}
rm -rf rst.linker.egg-info

%build
%python_build
%__python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo

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

%check
%python_exec %{_bindir}/py.test -v test_all.py

%files %{python_files}
%defattr(-,root,root)
%doc CHANGES.rst README.rst
%doc build/sphinx/html
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by