[sagemath] 01/02: More docbuild fixes

Ximin Luo infinity0 at debian.org
Thu Sep 29 11:48:00 UTC 2016


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository sagemath.

commit fc0cc8952aa254aa3f20df9e287a1abab05cc162
Author: Ximin Luo <infinity0 at debian.org>
Date:   Thu Sep 29 04:22:53 2016 +0200

    More docbuild fixes
---
 debian/patches/debian-no-singular-hlp.patch        | 38 ++++++++++++++++++++++
 .../patches/fixsage-use-lexists-not-exists.patch   | 17 ++++++++++
 debian/patches/series                              |  2 ++
 3 files changed, 57 insertions(+)

diff --git a/debian/patches/debian-no-singular-hlp.patch b/debian/patches/debian-no-singular-hlp.patch
new file mode 100644
index 0000000..ae2f419
--- /dev/null
+++ b/debian/patches/debian-no-singular-hlp.patch
@@ -0,0 +1,38 @@
+Description: Don't try to use singular.hlp
+ We currently don't ship that in our Debian package; we should (TODO).
+Author: Ximin Luo <infinity0 at debian.org>
+Forwarded: not-needed
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/sage/src/sage/interfaces/singular.py
++++ b/sage/src/sage/interfaces/singular.py
+@@ -1245,9 +1245,9 @@
+         self._start()
+         raise KeyboardInterrupt("Restarting %s (WARNING: all variables defined in previous session are now invalid)" % self)
+ 
+-    
++
+ class SingularElement(ExtraTabCompletion, ExpectElement):
+-    
++
+     def __init__(self, parent, type, value, is_name=False):
+         """
+         EXAMPLES::
+@@ -2256,7 +2256,7 @@
+ 
+     L, in_node, curr_node = [], False, None
+ 
+-    for line in open(singular_docdir + "singular.hlp"):
++    '''for line in open(singular_docdir + "singular.hlp"):
+         m = re.match(new_node,line)
+         if m:
+             # a new node starts
+@@ -2275,7 +2275,7 @@
+         if line == "6 Index\n":
+             in_node = False
+ 
+-    nodes[curr_node] = "".join(L) # last node
++    nodes[curr_node] = "".join(L) # last node'''
+ 
+ def get_docstring(name):
+     """
diff --git a/debian/patches/fixsage-use-lexists-not-exists.patch b/debian/patches/fixsage-use-lexists-not-exists.patch
new file mode 100644
index 0000000..8d1e9c6
--- /dev/null
+++ b/debian/patches/fixsage-use-lexists-not-exists.patch
@@ -0,0 +1,17 @@
+Description: Use lexists instead of exists
+ os.path.exists returns False for a broken symlink; we want lexists here
+Author: Ximin Luo <infinity0 at debian.org>
+Bug: TODO, file to sage
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/sage/src/sage_setup/docbuild/ext/multidocs.py
++++ b/sage/src/sage_setup/docbuild/ext/multidocs.py
+@@ -278,7 +278,7 @@
+             app.builder.info(bold('linking _static directory.'))
+             static_dir = os.path.join(app.builder.outdir, '_static')
+             master_static_dir = os.path.join('..', '_static')
+-            if os.path.exists(static_dir):
++            if os.path.lexists(static_dir):
+                 if os.path.isdir(static_dir) and not os.path.islink(static_dir):
+                     shutil.rmtree(static_dir)
+                 else:
diff --git a/debian/patches/series b/debian/patches/series
index a3a2304..49f8d45 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,6 +7,7 @@ sagedoc_avoid_exception.patch
 fixsage-mpfi.patch
 fixsage-sphinx.patch
 fixsage-libgap-systemwide.patch
+fixsage-use-lexists-not-exists.patch
 
 # due to us using a different version of a dependency than what Sage uses
 # we'll probably drop these when importing the next version of Sage
@@ -30,6 +31,7 @@ debian-arb.patch
 debian-cython-sys-path.patch
 debian-sage-env.patch
 debian-octave.patch
+debian-no-singular-hlp.patch
 
 # temporary patches for whatever reason
 # they will eventually be gotten rid of

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git



More information about the debian-science-commits mailing list