Rebuild for Python 3.13
Requires upstream commits from https://github.com/swig/swig/pull/2925
This commit is contained in:
parent
7c0f355005
commit
b2f85aac64
3 changed files with 68 additions and 1 deletions
34
swig-python-Python-3.13-strips-docstring-indent.patch
Normal file
34
swig-python-Python-3.13-strips-docstring-indent.patch
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
From ffa856c8dc1fa97e6896a2c5d5bd647c15df2284 Mon Sep 17 00:00:00 2001
|
||||
From: Julien Schueller <schueller@phimeca.com>
|
||||
Date: Thu, 13 Jun 2024 15:31:26 +0200
|
||||
Subject: [PATCH] Python 3.13 strips docstring indent
|
||||
|
||||
---
|
||||
Examples/test-suite/python/python_docstring_runme.py | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Examples/test-suite/python/python_docstring_runme.py b/Examples/test-suite/python/python_docstring_runme.py
|
||||
index a601ecb5430..101f9dd8a30 100644
|
||||
--- a/Examples/test-suite/python/python_docstring_runme.py
|
||||
+++ b/Examples/test-suite/python/python_docstring_runme.py
|
||||
@@ -1,5 +1,6 @@
|
||||
from python_docstring import *
|
||||
import inspect
|
||||
+import sys
|
||||
|
||||
def check(got, expected):
|
||||
expected_list = expected.split("\n")
|
||||
@@ -87,9 +88,10 @@ def check(got, expected):
|
||||
)
|
||||
|
||||
# One line doc special case, use __doc__
|
||||
-check(DocStrings.docstringX.__doc__,
|
||||
- " one line docs"
|
||||
- )
|
||||
+if sys.version_info[0:2] < (3, 13):
|
||||
+ check(DocStrings.docstringX.__doc__, " one line docs")
|
||||
+else:
|
||||
+ check(DocStrings.docstringX.__doc__, "one line docs")
|
||||
|
||||
check(inspect.getdoc(DocStrings.docstringX),
|
||||
"one line docs"
|
||||
Loading…
Add table
Add a link
Reference in a new issue