[packages/python3-manuel] - updated tests invocation, added fix for invalid escape sequence
qboosh
qboosh at pld-linux.org
Fri May 30 19:52:35 CEST 2025
commit 9a721366ee2401eae8a5a69aa3f0de7b8e6897ce
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri May 30 19:36:52 2025 +0200
- updated tests invocation, added fix for invalid escape sequence
manuel-escape.patch | 11 +++++++++++
python3-manuel.spec | 9 ++++++++-
2 files changed, 19 insertions(+), 1 deletion(-)
---
diff --git a/python3-manuel.spec b/python3-manuel.spec
index 2acd277..ee18aa6 100644
--- a/python3-manuel.spec
+++ b/python3-manuel.spec
@@ -13,6 +13,7 @@ Group: Libraries/Python
#Source0Download: https://pypi.org/simple/manuel/
Source0: https://files.pythonhosted.org/packages/source/m/manuel/manuel-%{version}.tar.gz
# Source0-md5: 42caa321f5244b6ec38da5b9bc440d94
+Patch0: manuel-escape.patch
URL: https://pypi.org/project/manuel/
BuildRequires: python3-modules >= 1:3.7
BuildRequires: python3-setuptools
@@ -49,9 +50,15 @@ Dokumentacja API modułu Pythona manuel.
%prep
%setup -q -n manuel-%{version}
+%patch -P0 -p1
%build
-%py3_build %{?with_tests:test}
+%py3_build
+
+%if %{with tests}
+PYTHONPATH=$(pwd)/src \
+%{__python3} -c '__import__("manuel.tests").tests.test_suite()'
+%endif
%if %{with doc}
sphinx-build-3 -b html -c sphinx src/manuel sphinx/_build/html
diff --git a/manuel-escape.patch b/manuel-escape.patch
new file mode 100644
index 0000000..094107e
--- /dev/null
+++ b/manuel-escape.patch
@@ -0,0 +1,11 @@
+--- manuel-1.13.0/src/manuel/testcase.py.orig 2023-09-23 16:02:54.000000000 +0200
++++ manuel-1.13.0/src/manuel/testcase.py 2025-05-30 19:19:00.649950674 +0200
+@@ -6,7 +6,7 @@ import textwrap
+
+ punctuation = re.escape(string.punctuation)
+ SECTION_TITLE = re.compile(r'^.+$', re.MULTILINE)
+-SECTION_UNDERLINE = re.compile('^[' + punctuation + ']+\s*$', re.MULTILINE)
++SECTION_UNDERLINE = re.compile('^[' + punctuation + r']+\s*$', re.MULTILINE)
+ MARKER = re.compile(r'^.. test-case: (\S+)', re.MULTILINE)
+
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-manuel.git/commitdiff/9a721366ee2401eae8a5a69aa3f0de7b8e6897ce
More information about the pld-cvs-commit
mailing list