Accepting request 701429 from home:jayvdb:coala:python3-bears

- Add optional build dependencies Pillow, Pygments and roman,
  causing 16 additonal test methods to run
- Add Recommends for Pillow, Pygments and roman
- Use %license
- Simplify test invocation

OBS-URL: https://build.opensuse.org/request/show/701429
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docutils?expand=0&rev=51
This commit is contained in:
Tomáš Chvátal 2019-05-08 10:06:25 +00:00 committed by Git OBS Bridge
parent ec6812ad0d
commit 3736bf6346
2 changed files with 23 additions and 4 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue May 7 15:03:33 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Add optional build dependencies Pillow, Pygments and roman,
causing 16 additonal test methods to run
- Add Recommends for Pillow, Pygments and roman
- Use %license
- Simplify test invocation
-------------------------------------------------------------------
Wed Jan 9 22:14:42 UTC 2019 - Matej Cepl <mcepl@suse.com>

View File

@ -23,15 +23,21 @@ Release: 0
Summary: Python Documentation Utilities
License: Python-2.0 AND BSD-2-Clause AND GPL-2.0-or-later AND GPL-3.0-or-later AND SUSE-Public-Domain
Group: Development/Languages/Python
Url: https://pypi.python.org/pypi/docutils/
URL: https://pypi.python.org/pypi/docutils/
Source: https://files.pythonhosted.org/packages/source/d/docutils/docutils-%{version}.tar.gz
Source99: python-docutils-rpmlintrc
BuildRequires: %{python_module Pillow}
BuildRequires: %{python_module Pygments}
BuildRequires: %{python_module roman}
BuildRequires: %{python_module xml}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-xml
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: python-Pillow
Recommends: python-Pygments
Recommends: python-roman
BuildArch: noarch
%ifpython3
Provides: docutils = %{version}
@ -58,6 +64,10 @@ sed -i -e "1d" "docutils/writers/xetex/__init__.py" "docutils/writers/_html_base
%build
%python_build
# test3 is generated from test during build
mv test test%{python2_bin_suffix}
mv test3 test%{python3_bin_suffix}
%install
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
@ -87,11 +97,11 @@ fi
%endif
%check
%python_exec -c 'import subprocess; import sys; sys.exit(subprocess.call([sys.executable, "test/alltests.py" if sys.version_info[0] == 2 else "test3/alltests.py"]))'
%python_exec test%{$python_bin_suffix}/alltests.py
%files %{python_files}
%defattr(-,root,root,-)
%doc COPYING.txt FAQ.txt HISTORY.txt README.txt THANKS.txt BUGS.txt docs/* licenses
%license COPYING.txt licenses/*.txt
%doc FAQ.txt HISTORY.txt README.txt THANKS.txt BUGS.txt docs/*
%python3_only %{_bindir}/rst2html
%python3_only %{_bindir}/rst2latex
%python3_only %{_bindir}/rst2man