From 76b2628c856a693fc5934ce74faaa0b75f670f42aa12ae8d0a988358739b42bf Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 24 Jan 2023 06:53:46 +0000 Subject: [PATCH] - Refactor pygments-2.14.patch to not use distutils. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docutils?expand=0&rev=81 --- pygments-2.14.patch | 4 ++-- python-docutils.changes | 5 +++++ python-docutils.spec | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pygments-2.14.patch b/pygments-2.14.patch index 551304e..f6be9ed 100644 --- a/pygments-2.14.patch +++ b/pygments-2.14.patch @@ -656,11 +656,11 @@ Index: docutils-0.19/docutils/utils/code_analyzer.py from docutils import ApplicationError try: import pygments -+ from distutils.version import LooseVersion ++ from packaging.version import Version from pygments.lexers import get_lexer_by_name from pygments.formatters.html import _get_ttype_class with_pygments = True -+ pygments_version = LooseVersion(pygments.__version__) ++ pygments_version = Version(pygments.__version__) except ImportError: with_pygments = False + pygments_version = '0' diff --git a/python-docutils.changes b/python-docutils.changes index 6f35b3f..0dca8da 100644 --- a/python-docutils.changes +++ b/python-docutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 24 06:53:16 UTC 2023 - Steve Kowalik + +- Refactor pygments-2.14.patch to not use distutils. + ------------------------------------------------------------------- Tue Jan 10 15:42:55 UTC 2023 - Daniel Garcia diff --git a/python-docutils.spec b/python-docutils.spec index 83266b9..9a4fe39 100644 --- a/python-docutils.spec +++ b/python-docutils.spec @@ -45,11 +45,13 @@ Requires(post): update-alternatives Requires(postun):update-alternatives Recommends: python-Pillow Recommends: python-Pygments +Requires: python-packaging Recommends: python-roman BuildArch: noarch %if %{with test} BuildRequires: %{python_module Pillow} BuildRequires: %{python_module Pygments} +BuildRequires: %{python_module packaging} BuildRequires: %{python_module roman} %endif %if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3"