summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-04-16 23:44:01 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-05-12 12:45:49 -0400
commit2576d9ffc4c5cf84c4c6c1dfee2d2d8655fba4b4 (patch)
treeb02a2d75f95e44173d9aa2fb807bb79471e7c8ac /gnu/packages/patches
parent5fdae311a0a5beaff5f048001f56ff0fa7d05e4c (diff)
downloadguix-2576d9ffc4c5cf84c4c6c1dfee2d2d8655fba4b4.tar.gz
gnu: python-ipython-documentation: Also build info and pdf targets.
* gnu/packages/patches/python-ipython-documentation-chars.patch: New file.
* gnu/packages/patches/python-ipython-documentation-repro.patch: Likewise.
* gnu/local.mk: Register them.
* gnu/packages/python-xyz.scm (python-ipython-documentation)
[source]: Apply patches.
[arguments]: Use gexps.
[phases]{sanitize-sources}: New phase.
{configure-sphinx-for-xelatex}: Likewise.
{install}: Streamline.  Also build and install the PDF and info manual.
Enable parallel processing.
[inputs]: Delete field.
[propagated-inputs]: Remove texlive-updmap.cfg input.  Add fontconfig,
font-gnu-freefont, graphviz, python-docrepr, texlive-polyglossia,
texlive-bin and texlive-xindy.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/python-ipython-documentation-chars.patch18
-rw-r--r--gnu/packages/patches/python-ipython-documentation-repro.patch25
2 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-ipython-documentation-chars.patch b/gnu/packages/patches/python-ipython-documentation-chars.patch
new file mode 100644
index 0000000000..a52c54f513
--- /dev/null
+++ b/gnu/packages/patches/python-ipython-documentation-chars.patch
@@ -0,0 +1,18 @@
+Avoid LaTeX errors due to non-printable characters.
+Submitted upstream: https://github.com/ipython/ipython/pull/13640
+
+diff --git a/IPython/utils/coloransi.py b/IPython/utils/coloransi.py
+index e33142180..9300b0108 100644
+--- a/IPython/utils/coloransi.py
++++ b/IPython/utils/coloransi.py
+@@ -74,8 +74,8 @@ class TermColors:
+ class InputTermColors:
+     """Color escape sequences for input prompts.
+ 
+-    This class is similar to TermColors, but the escapes are wrapped in \001
+-    and \002 so that readline can properly know the length of each line and
++    This class is similar to TermColors, but the escapes are wrapped in \\001
++    and \\002 so that readline can properly know the length of each line and
+     can wrap lines accordingly.  Use this class for any colored text which
+     needs to be used in input prompts, such as in calls to raw_input().
+ 
diff --git a/gnu/packages/patches/python-ipython-documentation-repro.patch b/gnu/packages/patches/python-ipython-documentation-repro.patch
new file mode 100644
index 0000000000..d6a6e9c3fd
--- /dev/null
+++ b/gnu/packages/patches/python-ipython-documentation-repro.patch
@@ -0,0 +1,25 @@
+Fix non-reproducibilities caused by time-dependent procedures.
+Submitted upstream: https://github.com/ipython/ipython/pull/13640
+
+diff --git a/IPython/sphinxext/ipython_directive.py b/IPython/sphinxext/ipython_directive.py
+index 18bdfcae9..2c665ac87 100644
+--- a/IPython/sphinxext/ipython_directive.py
++++ b/IPython/sphinxext/ipython_directive.py
+@@ -19,7 +19,7 @@
+    In [1]: 1+1
+ 
+    In [1]: import datetime
+-      ...: datetime.datetime.now()
++      ...: datetime.date.fromisoformat('2022-02-22')
+ 
+ It supports IPython construct that plain
+ Python does not understand (like magics):
+@@ -28,7 +28,7 @@
+ 
+    In [0]: import time
+ 
+-   In [0]: %timeit time.sleep(0.05)
++   In [0]: %pdoc time
+ 
+ This will also support top-level async when using IPython 7.0+
+