diff --git a/python-sphinxcontrib-autoprogram-no-six.patch b/python-sphinxcontrib-autoprogram-no-six.patch new file mode 100644 index 0000000..671c1fe --- /dev/null +++ b/python-sphinxcontrib-autoprogram-no-six.patch @@ -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(): diff --git a/python-sphinxcontrib-autoprogram.changes b/python-sphinxcontrib-autoprogram.changes index 1cc9616..14ad60b 100644 --- a/python-sphinxcontrib-autoprogram.changes +++ b/python-sphinxcontrib-autoprogram.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +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 diff --git a/python-sphinxcontrib-autoprogram.spec b/python-sphinxcontrib-autoprogram.spec index 07c056e..95eb08a 100644 --- a/python-sphinxcontrib-autoprogram.spec +++ b/python-sphinxcontrib-autoprogram.spec @@ -42,15 +42,15 @@ Source0: %{URL}/archive/%{version}/python-sphinxcontrib-%{short_name}-%{v Patch1: skip-failing-test.patch # PATCH-FIX-UPSTREAM sphinx6.patch gh#sphinx-contrib/autoprogram#62 Patch2: sphinx6.patch +# https://github.com/sphinx-contrib/autoprogram/issues/63 +Patch3: python-sphinxcontrib-autoprogram-no-six.patch BuildRequires: %{python_module Sphinx >= 1.2} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-Sphinx >= 1.2 -Requires: python-six BuildArch: noarch %if "%{flavor}" == "test" -BuildRequires: %{python_module six} BuildRequires: %{python_module sphinxcontrib-autoprogram == %{version}} BuildRequires: %{python_module sphinxcontrib-websupport >= 1.0.1} %endif @@ -73,7 +73,7 @@ it into a set of .. program:: and .. option:: directives. %endif %prep -%autosetup -n %{short_name}-%{version} -p1 +%autosetup -p1 -n %{short_name}-%{version} -p1 %build %if "%{flavor}" == ""