- Add sphinx6.patch to support Sphinx >= 6.0, gh#sphinx-contrib/autoprogram#62

- Delete python-sphinxcontrib-autoprogram-python310.patch
- skip-failing-test.patch
- Update to 0.1.8
  * Test against Python 3.10, 3.11.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sphinxcontrib-autoprogram?expand=0&rev=14
This commit is contained in:
2023-03-06 10:29:47 +00:00
committed by Git OBS Bridge
parent 3c99140144
commit 09dba5c6bc
6 changed files with 56 additions and 28 deletions

View File

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

View File

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

View File

@@ -1,19 +0,0 @@
---
sphinxcontrib/autoprogram.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/sphinxcontrib/autoprogram.py
+++ b/sphinxcontrib/autoprogram.py
@@ -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(

View File

@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Feb 20 10:40:25 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
- Add sphinx6.patch to support Sphinx >= 6.0, gh#sphinx-contrib/autoprogram#62
- Delete python-sphinxcontrib-autoprogram-python310.patch
- skip-failing-test.patch
- Update to 0.1.8
* Test against Python 3.10, 3.11.
-------------------------------------------------------------------
Thu Dec 8 09:33:55 UTC 2022 - Matej Cepl <mcepl@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,7 +26,7 @@
%define skip_python36 1
%define skip_python2 1
Name: python-sphinxcontrib-%{short_name}%{psuffix}
Version: 0.1.7
Version: 0.1.8
Release: 0
%if "%{flavor}" == "" || "%{flavor}" == "test"
Summary: Sphinx extension to document CLI programs
@@ -37,11 +37,11 @@ Summary: Documentation for sphinxcontrib-autoprogram
License: BSD-2-Clause
URL: https://github.com/sphinx-contrib/%{short_name}
Source0: %{URL}/archive/%{version}/python-sphinxcontrib-%{short_name}-%{version}.tar.gz
# https://github.com/sphinx-contrib/autoprogram/pull/25
Patch0: python-sphinxcontrib-autoprogram-python310.patch
# PATCH-FIX-UPSTREAM skip-failing-test.patch gh#sphinx-contrib/autoprogram#54 mcepl@suse.com
# Switch off failing tests by the environmental variable SKIPTESTS
Patch1: skip-failing-test.patch
# PATCH-FIX-UPSTREAM sphinx6.patch gh#sphinx-contrib/autoprogram#62
Patch2: sphinx6.patch
BuildRequires: %{python_module Sphinx >= 1.2}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
@@ -51,11 +51,12 @@ Requires: python-six
BuildArch: noarch
%if "%{flavor}" == "test"
BuildRequires: %{python_module six}
BuildRequires: %{python_module sphinxcontrib-autoprogram}
BuildRequires: %{python_module sphinxcontrib-autoprogram == %{version}}
BuildRequires: %{python_module sphinxcontrib-websupport >= 1.0.1}
%endif
%if "%{flavor}" == "doc"
BuildRequires: %{python_module sphinxcontrib-autoprogram}
BuildRequires: %{python_module sphinxcontrib-autoprogram == %{version}}
BuildRequires: %{python_module sphinxcontrib-websupport}
%endif
%python_subpackages

37
sphinx6.patch Normal file
View File

@@ -0,0 +1,37 @@
From ca22060f8be35e2ba8009a50d3b0c4638219fe5d Mon Sep 17 00:00:00 2001
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
Date: Mon, 6 Mar 2023 11:25:04 +0100
Subject: [PATCH] doc: Fix build with sphinx > 6.0
Fix https://github.com/sphinx-contrib/autoprogram/issues/61
---
doc/conf.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: autoprogram-0.1.8/doc/conf.py
===================================================================
--- autoprogram-0.1.8.orig/doc/conf.py
+++ autoprogram-0.1.8/doc/conf.py
@@ -282,18 +282,18 @@ intersphinx_mapping = {
extlinks = {
'pull': (
'https://github.com/sphinx-contrib/autoprogram/pull/%s',
- '#'
+ '#%s'
),
'issue': (
'https://github.com/sphinx-contrib/autoprogram/issues/%s',
- '#'
+ '#%s'
),
'bbpull': (
'https://bitbucket.org/birkenfeld/sphinx-contrib/pull-request/%s/',
- 'Bitbucket PR #',
+ 'Bitbucket PR #%s',
),
'bbissue': (
'https://bitbucket.org/birkenfeld/sphinx-contrib/issue/%s/',
- 'Bitbucket issue #',
+ 'Bitbucket issue #%s',
),
}