fix sphinx flags.py: python 3.12 dropped distutils
https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10922
This commit is contained in:
parent
f7e9d694be
commit
1b7335d495
37
10922.patch
Normal file
37
10922.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From 2e6447e073144b9b1352d5167f67ccd07460444a Mon Sep 17 00:00:00 2001
|
||||
From: Jens Petersen <petersen@redhat.com>
|
||||
Date: Thu, 20 Jul 2023 13:16:03 +0800
|
||||
Subject: [PATCH] user_guide/flags.py: python-3.12 no longer includes distutils
|
||||
|
||||
packaging.version seems able to handle this fine
|
||||
---
|
||||
docs/users_guide/flags.py | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/docs/users_guide/flags.py b/docs/users_guide/flags.py
|
||||
index f6927d59817..474d1b65d4b 100644
|
||||
--- a/docs/users_guide/flags.py
|
||||
+++ b/docs/users_guide/flags.py
|
||||
@@ -50,7 +50,7 @@ import sphinx
|
||||
from sphinx import addnodes
|
||||
from sphinx.domains.std import GenericObject
|
||||
from sphinx.errors import SphinxError
|
||||
-from distutils.version import LooseVersion
|
||||
+from packaging.version import parse
|
||||
from utils import build_table_from_list
|
||||
|
||||
import os.path
|
||||
@@ -628,8 +628,8 @@ def purge_flags(app, env, docname):
|
||||
|
||||
def setup(app):
|
||||
# The override argument to add_directive_to_domain is only supported by >= 1.8
|
||||
- sphinx_version = LooseVersion(sphinx.__version__)
|
||||
- override_arg = {'override': True} if sphinx_version >= LooseVersion('1.8') else {}
|
||||
+ sphinx_version = parse(sphinx.__version__)
|
||||
+ override_arg = {'override': True} if sphinx_version >= parse('1.8') else {}
|
||||
|
||||
# Add ghc-flag directive, and override the class with our own
|
||||
app.add_object_type('ghc-flag', 'ghc-flag')
|
||||
--
|
||||
GitLab
|
||||
|
4
ghc.spec
4
ghc.spec
@ -118,6 +118,9 @@ Patch2: ghc-Cabal-install-PATH-warning.patch
|
||||
Patch3: ghc-gen_contents_index-nodocs.patch
|
||||
# https://gitlab.haskell.org/ghc/ghc/-/issues/23286 (sphinx modern extlinks)
|
||||
Patch9: https://gitlab.haskell.org/ghc/ghc/-/commit/00dc51060881df81258ba3b3bdf447294618a4de.patch
|
||||
# distutils gone in python 3.12
|
||||
# https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10922
|
||||
Patch8: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10922.patch
|
||||
|
||||
# https://phabricator.haskell.org/rGHC4eebc8016f68719e1ccdf460754a97d1f4d6ef05
|
||||
# https://gitlab.haskell.org/ghc/ghc/-/issues/19684
|
||||
@ -448,6 +451,7 @@ Installing this package causes %{name}-*-prof packages corresponding to
|
||||
|
||||
%patch -P2 -p1 -b .orig
|
||||
%patch -P9 -p1 -b .orig
|
||||
%patch -P8 -p1 -b .orig
|
||||
%patch -P10 -p1 -b .orig
|
||||
%patch -P11 -p1 -b .orig11
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user