[sagemath] 01/01: More doc fixes

Ximin Luo infinity0 at debian.org
Sat Dec 17 00:55:29 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 10746ce109902d437af9a407200b8a0569d9efa7
Author: Ximin Luo <infinity0 at debian.org>
Date:   Sat Dec 17 01:55:19 2016 +0100

    More doc fixes
---
 debian/patches/d1-doc-docs.patch                   | 23 ++++++++++++++++++++++
 .../patches/dt-work-around-doc-common-conf.patch   | 18 +++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 42 insertions(+)

diff --git a/debian/patches/d1-doc-docs.patch b/debian/patches/d1-doc-docs.patch
new file mode 100644
index 0000000..d342f7f
--- /dev/null
+++ b/debian/patches/d1-doc-docs.patch
@@ -0,0 +1,23 @@
+--- a/sage/src/sage/misc/sagedoc.py
++++ b/sage/src/sage/misc/sagedoc.py
+@@ -1471,8 +1471,8 @@
+         url = self._base_url + os.path.join(name, "index.html")
+         path = os.path.join(self._base_path, name, "index.html")
+         if not os.path.exists(path):
+-            raise OSError("""The document '{0}' does not exist.  Please build it
+-with 'sage -docbuild {0} html --mathjax' and try again.""".format(name))
++            raise OSError("""The document '{0}' does not exist.  Please install
++the 'sagemath-doc-en' package and try again.""".format(name))
+ 
+         if testing:
+             return (url, path)
+--- a/sage/src/sage/misc/copying.py
++++ b/sage/src/sage/misc/copying.py
+@@ -14,6 +14,6 @@
+         return "Type license() to see the full license text."
+ 
+     def __str__(self):
+-        return open(os.path.join(SAGE_ROOT,'COPYING.txt')).read()
++        return open("/usr/share/doc/sagemath/copyright").read()
+ 
+ license = License()
diff --git a/debian/patches/dt-work-around-doc-common-conf.patch b/debian/patches/dt-work-around-doc-common-conf.patch
index 2f9662e..37bb1b6 100644
--- a/debian/patches/dt-work-around-doc-common-conf.patch
+++ b/debian/patches/dt-work-around-doc-common-conf.patch
@@ -64,3 +64,21 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  
  extensions = ['sphinx.ext.autodoc', 'sphinx.ext.mathjax', 'sphinx.ext.todo',
                'sphinx.ext.extlinks']
+--- a/sage/src/doc/common/conf.py
++++ b/sage/src/doc/common/conf.py
+@@ -1,10 +1,14 @@
+ import sys, os, sphinx
+-from sage.env import SAGE_DOC_SRC, SAGE_DOC, SAGE_SRC
++from sage.env import SAGE_DOC_SRC, SAGE_DOC, SAGE_SRC, SAGE_LIB
+ from datetime import date
+ 
+ # If your extensions are in another directory, add it here.
+ sys.path.append(os.path.join(SAGE_SRC, "sage_setup", "docbuild", "ext"))
+ 
++# If we can't find the doc sources, try in SAGE_LIB
++if not os.path.exists(SAGE_DOC_SRC):
++    SAGE_DOC_SRC = os.path.join(SAGE_LIB, 'sage', 'misc', 'docs')
++
+ # General configuration
+ # ---------------------
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 8b4d7d4..e7d93bc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -53,6 +53,7 @@ d1-sage-env.patch
 d1-scripts-dir.patch
 d1-fakeroot.patch
 d1-test-optional.patch
+d1-doc-docs.patch
 
 # Potentially controversial fixes
 # We had to do these to make things work, at some time in the past

-- 
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