Tomáš Chvátal 2019-06-06 12:04:08 +00:00 committed by Git OBS Bridge
parent 32c4e837b8
commit 9a1c19fd64

View File

@ -16,17 +16,28 @@
#
%define skip_python2 1
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-sphinxcontrib-devhelp
Name: python-sphinxcontrib-devhelp%{psuffix}
Version: 1.0.1
Release: 0
Summary: sphinx extension which outputs Devhelp documents
Summary: Sphinx extension which outputs Devhelp documents
License: BSD-2-Clause
Group: Development/Languages/Python
URL: https://github.com/sphinx-doc/sphinxcontrib-devhelp
Source: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-devhelp/sphinxcontrib-devhelp-%{version}.tar.gz
%if %{with test}
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module pytest}
%endif
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@ -44,15 +55,21 @@ sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document.
%python_build
%install
%if !%{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
%pytest
%endif
%if !%{with test}
%files %{python_files}
%doc CHANGES README.rst
%doc README.rst CHANGES
%license LICENSE
%{python_sitelib}/*
%endif
%changelog