forked from pool/python-sphinxcontrib-autoprogram
Accepting request 956687 from home:pgajdos:python
- fix build and introduced doc build flavor - modified sources % _multibuild - added patches fix https://github.com/sphinx-contrib/autoprogram/pull/25 + python-sphinxcontrib-autoprogram-python310.patch OBS-URL: https://build.opensuse.org/request/show/956687 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sphinxcontrib-autoprogram?expand=0&rev=9
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
<multibuild>
|
<multibuild>
|
||||||
|
<package>doc</package>
|
||||||
<package>test</package>
|
<package>test</package>
|
||||||
</multibuild>
|
</multibuild>
|
||||||
|
17
python-sphinxcontrib-autoprogram-python310.patch
Normal file
17
python-sphinxcontrib-autoprogram-python310.patch
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
Index: autoprogram-0.1.7/sphinxcontrib/autoprogram.py
|
||||||
|
===================================================================
|
||||||
|
--- autoprogram-0.1.7.orig/sphinxcontrib/autoprogram.py 2022-02-18 13:57:19.100334018 +0100
|
||||||
|
+++ autoprogram-0.1.7/sphinxcontrib/autoprogram.py 2022-02-18 13:57:56.028550128 +0100
|
||||||
|
@@ -476,7 +476,11 @@ class ScannerTestCase(unittest.TestCase)
|
||||||
|
# section: default optionals
|
||||||
|
program, options, group = sections[1]
|
||||||
|
self.assertEqual([], program)
|
||||||
|
- self.assertEqual("optional arguments", group.title)
|
||||||
|
+ # See https://github.com/sphinx-contrib/autoprogram/issues/24
|
||||||
|
+ if sys.version_info >= (3, 10):
|
||||||
|
+ self.assertEqual('options', group.title)
|
||||||
|
+ else:
|
||||||
|
+ self.assertEqual("optional arguments", group.title)
|
||||||
|
self.assertEqual(None, group.description)
|
||||||
|
self.assertEqual(2, len(options))
|
||||||
|
self.assertEqual(
|
@@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 22 11:19:17 UTC 2022 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- fix build and introduced doc build flavor
|
||||||
|
- modified sources
|
||||||
|
% _multibuild
|
||||||
|
- added patches
|
||||||
|
fix https://github.com/sphinx-contrib/autoprogram/pull/25
|
||||||
|
+ python-sphinxcontrib-autoprogram-python310.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Oct 12 13:40:48 UTC 2021 - pgajdos@suse.com
|
Tue Oct 12 13:40:48 UTC 2021 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -18,16 +18,14 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%global flavor @BUILD_FLAVOR@%{nil}
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
%if "%{flavor}" == "test"
|
%define psuffix %{nil}
|
||||||
%define psuffix -test
|
%if "%{flavor}" != ""
|
||||||
%bcond_without test
|
%define psuffix -%{flavor}
|
||||||
%else
|
|
||||||
%define psuffix %{nil}
|
|
||||||
%bcond_with test
|
|
||||||
%endif
|
%endif
|
||||||
%global short_name autoprogram
|
%global short_name autoprogram
|
||||||
# https://github.com/sphinx-contrib/autoprogram/commit/457822502b71a449d97dfece63e77dbee910b581
|
# https://github.com/sphinx-contrib/autoprogram/commit/457822502b71a449d97dfece63e77dbee910b581
|
||||||
%define skip_python36 1
|
%define skip_python36 1
|
||||||
|
%define skip_python2 1
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-sphinxcontrib-%{short_name}
|
Name: python-sphinxcontrib-%{short_name}
|
||||||
Version: 0.1.7
|
Version: 0.1.7
|
||||||
@@ -37,6 +35,8 @@ License: BSD-2-Clause
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/sphinx-contrib/%{short_name}
|
URL: https://github.com/sphinx-contrib/%{short_name}
|
||||||
Source0: %{URL}/archive/%{version}/%{name}-%{version}.tar.gz
|
Source0: %{URL}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
# https://github.com/sphinx-contrib/autoprogram/pull/25
|
||||||
|
Patch0: python-sphinxcontrib-autoprogram-python310.patch
|
||||||
BuildRequires: %{python_module Sphinx >= 1.2}
|
BuildRequires: %{python_module Sphinx >= 1.2}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@@ -44,7 +44,7 @@ BuildRequires: python-rpm-macros
|
|||||||
Requires: python-Sphinx >= 1.2
|
Requires: python-Sphinx >= 1.2
|
||||||
Requires: python-six
|
Requires: python-six
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if %{with test}
|
%if "%{flavor}" == "test"
|
||||||
BuildRequires: %{python_module six}
|
BuildRequires: %{python_module six}
|
||||||
BuildRequires: %{python_module sphinxcontrib-autoprogram}
|
BuildRequires: %{python_module sphinxcontrib-autoprogram}
|
||||||
BuildRequires: %{python_module sphinxcontrib-websupport >= 1.0.1}
|
BuildRequires: %{python_module sphinxcontrib-websupport >= 1.0.1}
|
||||||
@@ -59,6 +59,7 @@ it into a set of .. program:: and .. option:: directives.
|
|||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation for sphinxcontrib-autoprogram
|
Summary: Documentation for sphinxcontrib-autoprogram
|
||||||
Group: Documentation/HTML
|
Group: Documentation/HTML
|
||||||
|
BuildRequires: python3-sphinxcontrib-autoprogram
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
This package contains the documentation for the package
|
This package contains the documentation for the package
|
||||||
@@ -68,40 +69,35 @@ python-sphinxcontrib-autoprogram.
|
|||||||
%autosetup -n %{short_name}-%{version} -p1
|
%autosetup -n %{short_name}-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if !%{with test}
|
%if "%{flavor}" == ""
|
||||||
%python_build
|
%python_build
|
||||||
|
%endif
|
||||||
# need to set PYTHONPATH, otherwise the build won't find the extension in the
|
%if "%{flavor}" == "doc"
|
||||||
# subfolder
|
# PYTHONPATH='.' sphinx-build doc html
|
||||||
export PYTHONPATH=$(pwd)
|
|
||||||
# set PYTHON so that the sphinx Makefile picks up the correct python version
|
|
||||||
%{python_expand export PYTHON=$python}
|
|
||||||
sphinx-build -b html -d doc/_build/doctrees doc doc/_build/html
|
sphinx-build -b html -d doc/_build/doctrees doc doc/_build/html
|
||||||
|
|
||||||
# remove inventory file, not needed for the documentation
|
|
||||||
rm doc/_build/html/objects.inv
|
rm doc/_build/html/objects.inv
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if !%{with test}
|
%if "%{flavor}" == ""
|
||||||
%python_install
|
%python_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{with test}
|
%if "%{flavor}" == "test"
|
||||||
export PYTHONPATH='doc'
|
export PYTHONPATH='doc'
|
||||||
%pyunittest sphinxcontrib/autoprogram.py
|
%pyunittest sphinxcontrib/autoprogram.py
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if !%{with test}
|
%if "%{flavor}" == ""
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if !%{with test}
|
%if "%{flavor}" == "doc"
|
||||||
%files %{python_files doc}
|
%files %{python_files doc}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc doc/_build/html/*
|
%doc doc/_build/html/*
|
||||||
|
Reference in New Issue
Block a user