forked from pool/python-sphinxcontrib-autoprogram
- Switch to pyroject macros.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sphinxcontrib-autoprogram?expand=0&rev=20
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.osc
|
||||||
4
_multibuild
Normal file
4
_multibuild
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>doc</package>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
||||||
3
python-sphinxcontrib-autoprogram-0.1.8.tar.gz
Normal file
3
python-sphinxcontrib-autoprogram-0.1.8.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:c6c4e050ba4a6ae8cd8b1034fa1ab20371e3e2cc85ee23affd8bc4e6fe1c9255
|
||||||
|
size 18183
|
||||||
3
python-sphinxcontrib-autoprogram-0.1.9.tar.gz
Normal file
3
python-sphinxcontrib-autoprogram-0.1.9.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e27c34c3abda19e655f3ba19573f66901e5287cc75fc19bb13685756dc4d7c69
|
||||||
|
size 18303
|
||||||
37
python-sphinxcontrib-autoprogram-no-six.patch
Normal file
37
python-sphinxcontrib-autoprogram-no-six.patch
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
Index: autoprogram-0.1.8/sphinxcontrib/autoprogram.py
|
||||||
|
===================================================================
|
||||||
|
--- autoprogram-0.1.8.orig/sphinxcontrib/autoprogram.py
|
||||||
|
+++ autoprogram-0.1.8/sphinxcontrib/autoprogram.py
|
||||||
|
@@ -25,8 +25,8 @@ from docutils import nodes
|
||||||
|
from docutils.parsers.rst import Directive
|
||||||
|
from docutils.parsers.rst.directives import unchanged
|
||||||
|
from docutils.statemachine import StringList, ViewList
|
||||||
|
-from six import exec_
|
||||||
|
-from six.moves import builtins, reduce
|
||||||
|
+from functools import reduce
|
||||||
|
+import builtins
|
||||||
|
from sphinx.domains import std
|
||||||
|
from sphinx.util.nodes import nested_parse_with_titles
|
||||||
|
|
||||||
|
@@ -154,7 +153,7 @@ def import_object(import_name: str):
|
||||||
|
with open(f[0]) as fobj:
|
||||||
|
codestring = fobj.read()
|
||||||
|
foo = imp.new_module("foo")
|
||||||
|
- exec_(codestring, foo.__dict__)
|
||||||
|
+ exec(codestring, foo.__dict__)
|
||||||
|
|
||||||
|
sys.modules["foo"] = foo
|
||||||
|
mod = __import__("foo")
|
||||||
|
Index: autoprogram-0.1.8/setup.py
|
||||||
|
===================================================================
|
||||||
|
--- autoprogram-0.1.8.orig/setup.py
|
||||||
|
+++ autoprogram-0.1.8/setup.py
|
||||||
|
@@ -9,7 +6,7 @@ from setuptools import setup, find_packa
|
||||||
|
# Do not change the variable name. It's parsed by doc/conf.py script.
|
||||||
|
version = '0.1.8'
|
||||||
|
|
||||||
|
-requires = ['Sphinx >= 1.2', 'six']
|
||||||
|
+requires = ['Sphinx >= 1.2']
|
||||||
|
|
||||||
|
|
||||||
|
def readme():
|
||||||
93
python-sphinxcontrib-autoprogram.changes
Normal file
93
python-sphinxcontrib-autoprogram.changes
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 16 06:12:23 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Switch to pyroject macros.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 1 08:10:31 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 0.1.9:
|
||||||
|
* Test against Python 3.12.
|
||||||
|
* Drop support for Python 3.7.
|
||||||
|
- drop sphinx6.patch,
|
||||||
|
python-sphinxcontrib-autoprogram-no-six.patch (upstream)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 6 09:42:32 UTC 2023 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- do not require python-six
|
||||||
|
- added patches
|
||||||
|
fix https://github.com/sphinx-contrib/autoprogram/issues/63
|
||||||
|
+ python-sphinxcontrib-autoprogram-no-six.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
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>
|
||||||
|
|
||||||
|
- Add skip-failing-test.patch skipping failing test
|
||||||
|
gh#sphinx-contrib/autoprogram#54.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
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
|
||||||
|
|
||||||
|
- version update to 0.1.7
|
||||||
|
Version 0.1.7
|
||||||
|
-------------
|
||||||
|
- Publish to PyPI via Github Actions.
|
||||||
|
Version 0.1.6
|
||||||
|
-------------
|
||||||
|
- Dropped support for Python 2 and Pypy
|
||||||
|
- Declare this extension safe for parallel reading
|
||||||
|
- Migrate to Github Actions for CI [:issue:`28`, :pull:`32` by Langston Barrett]
|
||||||
|
- Test against recent versions of Sphinx [:issue:`33`, :pull:`32` by Langston Barrett]
|
||||||
|
- Format source code with Black [:issue:`30`, :pull:`32` by Langston Barrett]
|
||||||
|
- Add documentation to the ``sdist`` [:issue:`26`, :pull:`32` by Langston Barrett]
|
||||||
|
- Fixed unwanted ``<blockquote>`` tags in multi-line command descriptions that
|
||||||
|
are indented to match surrounding code. [:pull:`21` by dgw]
|
||||||
|
- deleted patches
|
||||||
|
- 0001-License-file-ci-skip.patch (upstreamed)
|
||||||
|
- added sources
|
||||||
|
+ _multibuild
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 18 10:25:10 UTC 2018 - Dan Čermák <dcermak@suse.com>
|
||||||
|
|
||||||
|
- Run tests in %check
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 13 10:59:56 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- Use noun phrase in summary.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 13 09:23:46 UTC 2018 - Dan Čermák <dcermak@suse.com>
|
||||||
|
|
||||||
|
- Fix package name in spec file header
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 13 07:43:53 UTC 2018 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Sort out with spec-cleaner, fix all FIXME mentions
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 12 15:44:15 UTC 2018 - Dan Čermák <dcermak@suse.com>
|
||||||
|
|
||||||
|
- Initial release
|
||||||
113
python-sphinxcontrib-autoprogram.spec
Normal file
113
python-sphinxcontrib-autoprogram.spec
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-sphinxcontrib-autoprogram
|
||||||
|
#
|
||||||
|
# Copyright (c) 2025 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/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%if "%{flavor}" != ""
|
||||||
|
%define psuffix -%{flavor}
|
||||||
|
%endif
|
||||||
|
%global short_name autoprogram
|
||||||
|
%{?sle15_python_module_pythons}
|
||||||
|
Name: python-sphinxcontrib-%{short_name}%{psuffix}
|
||||||
|
Version: 0.1.9
|
||||||
|
Release: 0
|
||||||
|
%if "%{flavor}" == "" || "%{flavor}" == "test"
|
||||||
|
Summary: Sphinx extension to document CLI programs
|
||||||
|
%endif
|
||||||
|
%if "%{flavor}" == "doc"
|
||||||
|
Summary: Documentation for sphinxcontrib-autoprogram
|
||||||
|
%endif
|
||||||
|
License: BSD-2-Clause
|
||||||
|
URL: https://github.com/sphinx-contrib/%{short_name}
|
||||||
|
Source0: %{URL}/archive/%{version}/python-sphinxcontrib-%{short_name}-%{version}.tar.gz
|
||||||
|
# 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
|
||||||
|
BuildRequires: %{python_module Sphinx >= 1.2}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires: python-Sphinx >= 1.2
|
||||||
|
BuildArch: noarch
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
BuildRequires: %{python_module sphinxcontrib-autoprogram == %{version}}
|
||||||
|
BuildRequires: %{python_module sphinxcontrib-websupport >= 1.0.1}
|
||||||
|
%endif
|
||||||
|
%if "%{flavor}" == "doc"
|
||||||
|
BuildRequires: %{python_module sphinxcontrib-autoprogram == %{version}}
|
||||||
|
BuildRequires: %{python_module sphinxcontrib-websupport}
|
||||||
|
%endif
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
|
%if "%{flavor}" == "doc"
|
||||||
|
%description
|
||||||
|
This package contains the documentation for the package
|
||||||
|
python-sphinxcontrib-autoprogram.
|
||||||
|
%endif
|
||||||
|
%if "%{flavor}" == "" || "%{flavor}" == "test"
|
||||||
|
%description
|
||||||
|
This contrib extension, sphinxcontrib.autoprogram, provides an automated way to
|
||||||
|
document CLI programs. It scans arparser.ArgumentParser object, and then expands
|
||||||
|
it into a set of .. program:: and .. option:: directives.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n %{short_name}-%{version} -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%if "%{flavor}" == ""
|
||||||
|
%pyproject_wheel
|
||||||
|
%endif
|
||||||
|
%if "%{flavor}" == "doc"
|
||||||
|
sphinx-build -b html -d doc/_build/doctrees doc doc/_build/html
|
||||||
|
rm doc/_build/html/objects.inv
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%install
|
||||||
|
%if "%{flavor}" == ""
|
||||||
|
%pyproject_install
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%check
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
export SKIPTESTS=1
|
||||||
|
%pyunittest -v sphinxcontrib.autoprogram.suite
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%{flavor}" == ""
|
||||||
|
%files %{python_files}
|
||||||
|
%doc README.rst
|
||||||
|
%license LICENSE
|
||||||
|
%dir %{python_sitelib}/sphinxcontrib
|
||||||
|
%dir %{python_sitelib}/sphinxcontrib/__pycache__
|
||||||
|
%{python_sitelib}/sphinxcontrib/autoprogram.py
|
||||||
|
%pycache_only %{python_sitelib}/sphinxcontrib/__pycache__/autoprogram.*.pyc
|
||||||
|
%{python_sitelib}/sphinxcontrib_autoprogram-%{version}.dist-info
|
||||||
|
%{python_sitelib}/sphinxcontrib_autoprogram-%{version}*-nspkg.pth
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%{flavor}" == "doc"
|
||||||
|
%files %{python_files}
|
||||||
|
%license LICENSE
|
||||||
|
%doc doc/_build/html/*
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%changelog
|
||||||
14
skip-failing-test.patch
Normal file
14
skip-failing-test.patch
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
sphinxcontrib/autoprogram.py | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
--- a/sphinxcontrib/autoprogram.py
|
||||||
|
+++ b/sphinxcontrib/autoprogram.py
|
||||||
|
@@ -544,6 +544,7 @@ class AutoprogramDirectiveTestCase(unitt
|
||||||
|
def tearDown(self) -> None:
|
||||||
|
sys.path[:] = self.untouched_sys_path
|
||||||
|
|
||||||
|
+ @unittest.skipIf('SKIPTESTS' in os.environ, "Skip failing test gh#sphinx-contrib/autoprogram#54")
|
||||||
|
def test_make_rst(self) -> None:
|
||||||
|
self.assertEqual(
|
||||||
|
"\n".join(self.directive.make_rst()).strip(),
|
||||||
37
sphinx6.patch
Normal file
37
sphinx6.patch
Normal 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',
|
||||||
|
),
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user