- Add PygmentsBridge-trime_doctest_flags.patch to allow build of
the documentation even with the current Sphinx. (SUSE-ONLY PATCH, DO NOT SEND UPSTREAM!) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=360
This commit is contained in:
parent
cd31207dec
commit
c0fecb5ffe
28
PygmentsBridge-trime_doctest_flags.patch
Normal file
28
PygmentsBridge-trime_doctest_flags.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
Doc/tools/extensions/pyspecific.py | 11 +++++++----
|
||||||
|
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
--- a/Doc/tools/extensions/pyspecific.py
|
||||||
|
+++ b/Doc/tools/extensions/pyspecific.py
|
||||||
|
@@ -31,14 +31,17 @@ Body.enum.converters['loweralpha'] = \
|
||||||
|
# doctest docs themselves
|
||||||
|
orig_visit_literal_block = HTMLTranslator.visit_literal_block
|
||||||
|
def new_visit_literal_block(self, node):
|
||||||
|
+ old_trim_doctest_flags = None
|
||||||
|
meta = self.builder.env.metadata[self.builder.current_docname]
|
||||||
|
- old_trim_doctest_flags = self.highlighter.trim_doctest_flags
|
||||||
|
- if 'keepdoctest' in meta:
|
||||||
|
- self.highlighter.trim_doctest_flags = False
|
||||||
|
+ if hasattr(self.highlighter, 'trim_doctest_flags'):
|
||||||
|
+ old_trim_doctest_flags = self.highlighter.trim_doctest_flags
|
||||||
|
+ if 'keepdoctest' in meta:
|
||||||
|
+ self.highlighter.trim_doctest_flags = False
|
||||||
|
try:
|
||||||
|
orig_visit_literal_block(self, node)
|
||||||
|
finally:
|
||||||
|
- self.highlighter.trim_doctest_flags = old_trim_doctest_flags
|
||||||
|
+ if old_trim_doctest_flags is not None:
|
||||||
|
+ self.highlighter.trim_doctest_flags = old_trim_doctest_flags
|
||||||
|
|
||||||
|
HTMLTranslator.visit_literal_block = new_visit_literal_block
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 24 20:50:27 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Add PygmentsBridge-trime_doctest_flags.patch to allow build of
|
||||||
|
the documentation even with the current Sphinx. (SUSE-ONLY
|
||||||
|
PATCH, DO NOT SEND UPSTREAM!)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Apr 30 18:18:09 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
Sun Apr 30 18:18:09 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
@ -146,6 +146,9 @@ Patch74: skip_unverified_test.patch
|
|||||||
# blocklist bypass via the urllib.parse component when supplying
|
# blocklist bypass via the urllib.parse component when supplying
|
||||||
# a URL that starts with blank characters
|
# a URL that starts with blank characters
|
||||||
Patch75: CVE-2023-24329-blank-URL-bypass.patch
|
Patch75: CVE-2023-24329-blank-URL-bypass.patch
|
||||||
|
# PATCH-FIX-OPENSUSE PygmentsBridge-trime_doctest_flags.patch mcepl@suse.com
|
||||||
|
# Build documentation even without PygmentsBridge.trim_doctest_flags
|
||||||
|
Patch76: PygmentsBridge-trime_doctest_flags.patch
|
||||||
# COMMON-PATCH-END
|
# COMMON-PATCH-END
|
||||||
%define python_version %(echo %{tarversion} | head -c 3)
|
%define python_version %(echo %{tarversion} | head -c 3)
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -293,6 +296,7 @@ other applications.
|
|||||||
%patch74 -p1
|
%patch74 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch75 -p1
|
%patch75 -p1
|
||||||
|
%patch76 -p1
|
||||||
|
|
||||||
# For patch 66
|
# For patch 66
|
||||||
cp -v %{SOURCE66} Lib/test/recursion.tar
|
cp -v %{SOURCE66} Lib/test/recursion.tar
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 24 20:50:27 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Add PygmentsBridge-trime_doctest_flags.patch to allow build of
|
||||||
|
the documentation even with the current Sphinx. (SUSE-ONLY
|
||||||
|
PATCH, DO NOT SEND UPSTREAM!)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Apr 30 18:18:09 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
Sun Apr 30 18:18:09 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@ URL: https://www.python.org/
|
|||||||
Source0: %{tarname}.tar.xz
|
Source0: %{tarname}.tar.xz
|
||||||
# docs for current version are regenerated every day
|
# docs for current version are regenerated every day
|
||||||
# this messes with autobuild "file changed" checks
|
# this messes with autobuild "file changed" checks
|
||||||
#Source2: https://docs.python.org/%{version}/archives/python-%{pyver}-docs-pdf-a4.tar.bz2
|
#Source2: https://docs.python.org/%%{version}/archives/python-%%{pyver}-docs-pdf-a4.tar.bz2
|
||||||
#Source3: https://docs.python.org/%{version}/archives/python-%{pyver}-docs-pdf-letter.tar.bz2
|
#Source3: https://docs.python.org/%%{version}/archives/python-%%{pyver}-docs-pdf-letter.tar.bz2
|
||||||
Source2: python-%{version}-docs-pdf-a4.tar.bz2
|
Source2: python-%{version}-docs-pdf-a4.tar.bz2
|
||||||
Source3: python-%{version}-docs-pdf-letter.tar.bz2
|
Source3: python-%{version}-docs-pdf-letter.tar.bz2
|
||||||
# For Patch 66
|
# For Patch 66
|
||||||
@ -145,6 +145,9 @@ Patch74: skip_unverified_test.patch
|
|||||||
# blocklist bypass via the urllib.parse component when supplying
|
# blocklist bypass via the urllib.parse component when supplying
|
||||||
# a URL that starts with blank characters
|
# a URL that starts with blank characters
|
||||||
Patch75: CVE-2023-24329-blank-URL-bypass.patch
|
Patch75: CVE-2023-24329-blank-URL-bypass.patch
|
||||||
|
# PATCH-FIX-OPENSUSE PygmentsBridge-trime_doctest_flags.patch mcepl@suse.com
|
||||||
|
# Build documentation even without PygmentsBridge.trim_doctest_flags
|
||||||
|
Patch76: PygmentsBridge-trime_doctest_flags.patch
|
||||||
# COMMON-PATCH-END
|
# COMMON-PATCH-END
|
||||||
Provides: pyth_doc = %{version}
|
Provides: pyth_doc = %{version}
|
||||||
Provides: pyth_ps = %{version}
|
Provides: pyth_ps = %{version}
|
||||||
@ -229,6 +232,7 @@ Python, and Macintosh Module Reference in PDF format.
|
|||||||
%patch74 -p1
|
%patch74 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch75 -p1
|
%patch75 -p1
|
||||||
|
%patch76 -p1
|
||||||
|
|
||||||
# For patch 66
|
# For patch 66
|
||||||
cp -v %{SOURCE66} Lib/test/recursion.tar
|
cp -v %{SOURCE66} Lib/test/recursion.tar
|
||||||
@ -270,7 +274,7 @@ done
|
|||||||
%dir %{_docdir}/python
|
%dir %{_docdir}/python
|
||||||
%doc %{_docdir}/python/Misc
|
%doc %{_docdir}/python/Misc
|
||||||
%doc %{_docdir}/python/html
|
%doc %{_docdir}/python/html
|
||||||
#%doc %{_docdir}/python/README
|
#%%doc %%{_docdir}/python/README
|
||||||
|
|
||||||
%files pdf
|
%files pdf
|
||||||
%defattr(644,root,root,755)
|
%defattr(644,root,root,755)
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 24 20:50:27 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Add PygmentsBridge-trime_doctest_flags.patch to allow build of
|
||||||
|
the documentation even with the current Sphinx. (SUSE-ONLY
|
||||||
|
PATCH, DO NOT SEND UPSTREAM!)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Apr 30 18:18:09 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
Sun Apr 30 18:18:09 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
@ -145,6 +145,9 @@ Patch74: skip_unverified_test.patch
|
|||||||
# blocklist bypass via the urllib.parse component when supplying
|
# blocklist bypass via the urllib.parse component when supplying
|
||||||
# a URL that starts with blank characters
|
# a URL that starts with blank characters
|
||||||
Patch75: CVE-2023-24329-blank-URL-bypass.patch
|
Patch75: CVE-2023-24329-blank-URL-bypass.patch
|
||||||
|
# PATCH-FIX-OPENSUSE PygmentsBridge-trime_doctest_flags.patch mcepl@suse.com
|
||||||
|
# Build documentation even without PygmentsBridge.trim_doctest_flags
|
||||||
|
Patch76: PygmentsBridge-trime_doctest_flags.patch
|
||||||
# COMMON-PATCH-END
|
# COMMON-PATCH-END
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: db-devel
|
BuildRequires: db-devel
|
||||||
@ -347,6 +350,7 @@ that rely on earlier non-verification behavior.
|
|||||||
%patch74 -p1
|
%patch74 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch75 -p1
|
%patch75 -p1
|
||||||
|
%patch76 -p1
|
||||||
|
|
||||||
# For patch 66
|
# For patch 66
|
||||||
cp -v %{SOURCE66} Lib/test/recursion.tar
|
cp -v %{SOURCE66} Lib/test/recursion.tar
|
||||||
|
Loading…
Reference in New Issue
Block a user