- Add multibuild to run tests

- Use the github source because the pypi doesn't have the tests
- Add patch 25.path to remove the sphinx-testing dependency

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sphinxcontrib-blockdiag?expand=0&rev=12
This commit is contained in:
2022-09-29 10:28:58 +00:00
committed by Git OBS Bridge
parent 82d349f993
commit a4c09ea68b
6 changed files with 1593 additions and 9 deletions

1554
25.patch Normal file

File diff suppressed because it is too large Load Diff

3
_multibuild Normal file
View File

@@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9061847004d900b458c2d611b4b539b2a3d594648060a222959f49c837cb41dc
size 12300

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Sep 29 10:26:09 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
- Add multibuild to run tests
- Use the github source because the pypi doesn't have the tests
- Add patch 25.path to remove the sphinx-testing dependency
-------------------------------------------------------------------
Mon Jan 10 22:28:47 UTC 2022 - Dirk Müller <dmueller@suse.com>

View File

@@ -18,17 +18,30 @@
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# Test files missing
%bcond_with test
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-sphinxcontrib-blockdiag
Version: 3.0.0
Release: 0
Summary: Sphinx "blockdiag" extension
License: BSD-2-Clause
URL: https://github.com/blockdiag/sphinxcontrib-blockdiag
Source: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-blockdiag/sphinxcontrib-blockdiag-%{version}.tar.gz
# Use the github tag instead of the pythonhosted.org to get the tests folder
Source: https://github.com/blockdiag/sphinxcontrib-blockdiag/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FEATURE-UPSTREAM 25.patch gh#blockdiag/sphinxcontrib-blockdiag#25
Patch: https://patch-diff.githubusercontent.com/raw/blockdiag/sphinxcontrib-blockdiag/pull/25.patch
BuildRequires: %{python_module Sphinx >= 2.0}
BuildRequires: %{python_module blockdiag >= 1.5.0}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -36,30 +49,36 @@ Requires: python-Sphinx >= 2.0
Requires: python-blockdiag >= 1.5.0
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module Sphinx-latex}
BuildRequires: %{python_module funcparserlib}
BuildRequires: %{python_module sphinx-testing}
BuildRequires: python-mock
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module sphinxcontrib-blockdiag = %{version}}
%endif
%python_subpackages
%description
A sphinx extension for embedding block diagram using blockdiag.
%prep
%setup -q -n sphinxcontrib-blockdiag-%{version}
%autosetup -p1 -n sphinxcontrib-blockdiag-%{version}
%build
%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}
%license LICENSE
%doc AUTHORS README.rst
@@ -67,5 +86,6 @@ A sphinx extension for embedding block diagram using blockdiag.
%pycache_only %{python_sitelib}/sphinxcontrib/__pycache__
%{python_sitelib}/sphinxcontrib_blockdiag-%{version}-py*-nspkg.pth
%{python_sitelib}/sphinxcontrib_blockdiag-%{version}-py*.egg-info
%endif
%changelog

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aa49bf924516f5de8a479994c7be81e077df5599c9da2a082003d5b388e1d450
size 6070