File python-sphinxcontrib-actdiag.spec of Package python-sphinxcontrib-actdiag

#
# spec file for package python-sphinxcontrib-actdiag
#
# Copyright (c) 2022 SUSE LLC
#
# 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/
#


%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# Test files missing gh#blockdiag/sphinxcontrib-actdiag#1
Name:           python-sphinxcontrib-actdiag
Version:        3.0.0
Release:        0
Summary:        Sphinx actdiag extension
License:        BSD-2-Clause
Group:          Development/Languages/Python
URL:            https://github.com/blockdiag/sphinxcontrib-actdiag
Source:         https://github.com/blockdiag/sphinxcontrib-actdiag/archive/refs/tags/%{version}.tar.gz
# PATCH-FIX-UPSTREAM remove_sphinx_testing.patch bsc#[0-9]+ mcepl@suse.com
# move from sphinx-testing to use standard pytest fixtures
Patch0:         remove_sphinx_testing.patch
BuildRequires:  %{python_module Sphinx >= 0.6}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-Sphinx >= 0.6
Requires:       python-actdiag >= 0.5.3
Requires:       python-blockdiag >= 1.5.0
BuildArch:      noarch
# SECTION test requirements
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module Sphinx-latex}
BuildRequires:  %{python_module actdiag >= 0.5.3}
BuildRequires:  %{python_module blockdiag >= 1.5.0}
# /SECTION
%python_subpackages

%description
A sphinx extension for embedding activity diagram using actdiag_.

%prep
%autosetup -p1 -n sphinxcontrib-actdiag-%{version}

# following patch0
mv -v tests/docs/basic tests/docs/test-basic
mv -v tests/docs/subdir tests/docs/test-subdir

%build
%python_build

%install
%python_install
%{python_expand mkdir -p %{buildroot}%{$python_sitelib}/sphinxcontrib/actdiag
%fdupes %{buildroot}%{$python_sitelib}
}

%check
%pytest

%files %{python_files}
%license LICENSE
%doc AUTHORS README.rst
%{python_sitelib}/sphinxcontrib/actdiag.py
%pycache_only %{python_sitelib}/sphinxcontrib/__pycache__
%{python_sitelib}/sphinxcontrib_actdiag-%{version}-py*-nspkg.pth
%{python_sitelib}/sphinxcontrib_actdiag-%{version}-py*.egg-info

%changelog
openSUSE Build Service is sponsored by