#
# 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:        4.5
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
* Sun Jul  9 2017 aloisio@gmx.com
- Fixed dateutil requires
* Tue Jul  4 2017 aloisio@gmx.com
- Update to version 1.9
  * Replacer now adds the Sphinx config namespace to the
    replacements, meaning that names like ``project``
    or ``copyright`` may be referenced in the format
    strings. This feature is particularly useful when
    coupled with the `jaraco.packaging
    <https://pypi.org/project/jaraco.packaging>`.sphinx
    plugin, which supplies a ``package_url``.
  1.8.2:
  * Added project description and updated changelog.
  1.8.1:
  * Issue #4: Prefer public API of ``app.confdir`` to private
    API.
  1.8:
  * Issue #4: Resolve deterministically the filenames relative to
    the config file.
  * *semver deviation*: This change is backward-incompatible
    for projects that relied on paths relative to the cwd where
    the cwd was not the directory of the config file.
- Converted to single-spec
* Sat Jul 30 2016 sor.alexei@meowr.ru
- Initial package.