2019-09-09 07:22:48 +00:00
#
# spec file for package python-restview
#
2021-01-13 13:20:26 +00:00
# Copyright (c) 2021 SUSE LLC
2019-09-09 07:22:48 +00:00
#
# 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.
2019-09-10 07:33:06 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
2019-09-09 07:22:48 +00:00
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name : python-restview
Version : 2.9.2
Release : 0
Summary : ReStructuredText viewer
2019-09-10 07:33:06 +00:00
License : GPL-3.0-only
2019-09-09 07:22:48 +00:00
Group : Development/Languages/Python
2019-09-10 07:33:06 +00:00
URL : https://mg.pov.lt/restview/
2019-09-09 07:22:48 +00:00
Source : https://files.pythonhosted.org/packages/source/r/restview/restview-%{version} .tar.gz
2021-04-01 13:00:40 +00:00
# PATCH-FIX-UPSTREAM https://github.com/mgedmin/restview/commit/a1ded30a87c65f3ce59a18497a7fc5099317c2be New mock release returns False from patcher.stop()
Patch0 : false.patch
2019-09-09 07:22:48 +00:00
BuildRequires : %{python_module setuptools}
2020-05-19 12:13:03 +00:00
BuildRequires : fdupes
2019-09-10 07:33:06 +00:00
BuildRequires : python-rpm-macros
2020-05-19 12:13:03 +00:00
Requires : python-docutils
Requires : python-pygments
Requires : python-readme_renderer
Requires(post) : update-alternatives
Requires(postun) : update-alternatives
BuildArch : noarch
2019-09-09 07:22:48 +00:00
# SECTION test requirements
BuildRequires : %{python_module docutils}
2019-09-10 07:33:06 +00:00
BuildRequires : %{python_module mock}
2019-09-09 07:22:48 +00:00
BuildRequires : %{python_module pygments}
2021-01-13 13:20:26 +00:00
BuildRequires : %{python_module pytest}
2019-09-09 07:22:48 +00:00
BuildRequires : %{python_module readme_renderer}
# /SECTION
%python_subpackages
%description
2019-09-10 07:33:06 +00:00
A viewer for ReStructuredText documents that renders them on the fly.
2019-09-09 07:22:48 +00:00
%prep
%setup -q -n restview-%{version}
2021-04-01 13:00:40 +00:00
%autopatch -p1
2019-09-09 07:22:48 +00:00
%build
%python_build
%install
%python_install
2020-05-19 12:13:03 +00:00
%python_clone -a %{buildroot} %{_bindir} /restview
2019-09-09 07:22:48 +00:00
%python_expand %fdupes %{buildroot} %{$python_sitelib}
%check
2021-01-13 13:20:26 +00:00
%pytest
2019-09-09 07:22:48 +00:00
2020-05-19 12:13:03 +00:00
%post
%python_install_alternative restview
%postun
%python_uninstall_alternative restview
2019-09-09 07:22:48 +00:00
%files %{python_files}
%doc CHANGES.rst README.rst
%license LICENSE
2020-05-19 12:13:03 +00:00
%python_alternative %{_bindir} /restview
2019-09-09 07:22:48 +00:00
%{python_sitelib} /*
%changelog