2021-06-29 09:47:29 +00:00
#
# spec file for package python-sphinx-tabs
#
2023-09-19 11:16:54 +00:00
# Copyright (c) 2023 SUSE LLC
2021-06-29 09:47:29 +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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
2021-11-18 20:40:05 +00:00
%if 0%{?sle_version} && 0%{?sle_version} <= 150300
%define pythons python3
%endif
2021-06-29 09:47:29 +00:00
%bcond_with test
2022-09-28 15:17:30 +00:00
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
2023-06-11 20:13:58 +00:00
%{?sle15_python_module_pythons}
2021-06-29 09:47:29 +00:00
Name : python-sphinx-tabs
2022-09-28 15:17:30 +00:00
Version : 3.4.1
2021-06-29 09:47:29 +00:00
Release : 0
Summary : Tabbed views for Sphinx
License : MIT
Group : Development/Languages/Python
2022-09-28 15:17:30 +00:00
URL : https://github.com/executablebooks/sphinx-tabs
# Use the github tag instead of the pythonhosted.org to get the tests folder
Source : https://github.com/executablebooks/sphinx-tabs/archive/refs/tags/v%{version} .tar.gz
2023-09-19 11:16:54 +00:00
# PATCH-FIX-UPSTREAM https://github.com/executablebooks/sphinx-tabs/commit/f60a10e13b3a6a8d1d27f285d9942b57ab07d0a8 Make the tests pass with Sphinx 7.1
Patch : sphinx71.patch
# PATCH-FIX-UPSTREAM https://github.com/executablebooks/sphinx-tabs/pull/179 Fix tests for Sphinx 7.2
Patch : sphinx72.patch
2021-06-29 09:47:29 +00:00
BuildRequires : %{python_module Pygments}
BuildRequires : %{python_module Sphinx}
BuildRequires : %{python_module docutils}
2022-09-28 15:17:30 +00:00
BuildRequires : fdupes
2021-06-29 09:47:29 +00:00
BuildRequires : python-rpm-macros
Requires : python-Pygments
Requires : python-Sphinx
Requires : python-docutils
BuildArch : noarch
2021-06-29 09:47:44 +00:00
%if %{with test}
2022-09-28 15:17:30 +00:00
BuildRequires : %{python_module beautifulsoup4}
BuildRequires : %{python_module pytest-regressions}
2021-06-29 09:47:44 +00:00
BuildRequires : %{python_module pytest}
2022-09-28 15:17:30 +00:00
BuildRequires : %{python_module sphinx-tabs = %{version} }
2021-06-29 09:47:44 +00:00
%endif
2021-06-29 09:47:29 +00:00
%python_subpackages
%description
Create tabbed content in Sphinx documentation when building HTML.
%prep
2023-09-19 11:16:54 +00:00
%autosetup -p1 -n sphinx-tabs-%{version}
2021-06-29 09:47:29 +00:00
%build
%python_build
%install
2022-09-28 15:17:30 +00:00
%if !%{with test}
2021-06-29 09:47:29 +00:00
%python_install
2022-09-28 15:17:30 +00:00
%python_expand %fdupes %{buildroot} %{$python_sitelib}
%endif
2021-06-29 09:47:29 +00:00
%if %{with test}
%check
2022-09-28 15:17:30 +00:00
# python-rinohtype is not available
%pytest -k 'not test_rinohtype_pdf'
2021-06-29 09:47:29 +00:00
%endif
2022-09-28 15:17:30 +00:00
%if !%{with test}
2021-06-29 09:47:29 +00:00
%files %{python_files}
2022-09-28 15:17:30 +00:00
%{python_sitelib} /sphinx_tabs
%{python_sitelib} /sphinx_tabs-%{version} *-info
%endif
2021-06-29 09:47:29 +00:00
%changelog