mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
nose: clean up, support Python 3.10. (#8825)
Due to changes in setuptools, we need to run 2to3 ourselves. While we're at it, lets apply relevant patches from Debian. https://salsa.debian.org/python-team/packages/nose/
This commit is contained in:
39
dev-python/nose/patches/debian/sphinx-class-directives.diff
Normal file
39
dev-python/nose/patches/debian/sphinx-class-directives.diff
Normal file
@@ -0,0 +1,39 @@
|
||||
From: Dmitry Shachnev <mitya57@debian.org>
|
||||
Date: Thu, 25 Jun 2020 11:58:34 +0300
|
||||
Subject: Use class-based directives to fix build with Sphinx 3.x
|
||||
|
||||
---
|
||||
nose/sphinx/pluginopts.py | 15 +++++++++++----
|
||||
1 file changed, 11 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/nose/sphinx/pluginopts.py b/nose/sphinx/pluginopts.py
|
||||
index d2b284a..033297b 100644
|
||||
--- a/nose/sphinx/pluginopts.py
|
||||
+++ b/nose/sphinx/pluginopts.py
|
||||
@@ -34,7 +34,7 @@ import os
|
||||
try:
|
||||
from docutils import nodes, utils
|
||||
from docutils.statemachine import ViewList
|
||||
- from docutils.parsers.rst import directives
|
||||
+ from docutils.parsers.rst import convert_directive_function, directives
|
||||
except ImportError:
|
||||
pass # won't run anyway
|
||||
|
||||
@@ -183,7 +183,14 @@ class Opt(object):
|
||||
|
||||
|
||||
def setup(app):
|
||||
+ autoplugin_directive.content = True
|
||||
+ autoplugin_directive.arguments = (1, 0, True)
|
||||
+ autoplugin_directive.options = {'plugin': directives.unchanged}
|
||||
app.add_directive('autoplugin',
|
||||
- autoplugin_directive, 1, (1, 0, 1),
|
||||
- plugin=directives.unchanged)
|
||||
- app.add_directive('autohelp', autohelp_directive, 0, (0, 0, 1))
|
||||
+ convert_directive_function(autoplugin_directive))
|
||||
+
|
||||
+ autohelp_directive.content = False
|
||||
+ autohelp_directive.arguments = (0, 0, True)
|
||||
+ autohelp_directive.options = {}
|
||||
+ app.add_directive('autohelp',
|
||||
+ convert_directive_function(autohelp_directive))
|
||||
Reference in New Issue
Block a user