[sasview] 06/08: Use local mathjax files rather than CDN

Stuart Prescott stuart at debian.org
Tue Oct 31 06:54:28 UTC 2017


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

stuart pushed a commit to branch master
in repository sasview.

commit a5089e0039af0d18d8042ed42155a07648d57dfa
Author: Stuart Prescott <stuart at debian.org>
Date:   Tue Oct 31 16:43:25 2017 +1100

    Use local mathjax files rather than CDN
---
 debian/control                            |  4 ++++
 debian/patches/series                     |  1 +
 debian/patches/sphinx-local-mathjax.patch | 14 ++++++++++++++
 debian/rules                              |  1 +
 4 files changed, 20 insertions(+)

diff --git a/debian/control b/debian/control
index aebd23e..bcc216f 100644
--- a/debian/control
+++ b/debian/control
@@ -8,6 +8,8 @@ Uploaders:
 Build-Depends:
  debhelper (>= 10),
  dh-python,
+ libjs-jquery,
+ libjs-mathjax,
  libpython-dev,
  python-all,
  python-numpy,
@@ -84,6 +86,8 @@ Package: sasview-doc
 Architecture: all
 Section: doc
 Depends:
+ libjs-jquery,
+ libjs-mathjax,
  ${misc:Depends},
  ${sphinxdoc:Depends}
 Description: Small Angle Scattering Analysis (common documentation)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f436b68
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+sphinx-local-mathjax.patch
diff --git a/debian/patches/sphinx-local-mathjax.patch b/debian/patches/sphinx-local-mathjax.patch
new file mode 100644
index 0000000..61ce4cb
--- /dev/null
+++ b/debian/patches/sphinx-local-mathjax.patch
@@ -0,0 +1,14 @@
+Description: Switch to local mathjax for documentation
+Author: Stuart Prescott <stuart at debian.org>
+
+--- a/docs/sphinx-docs/source/conf.py
++++ b/docs/sphinx-docs/source/conf.py
+@@ -39,7 +39,7 @@
+               'sphinx.ext.viewcode']
+ 
+ #set mathjax path
+-mathjax_path="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"
++mathjax_path = 'mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
+ 
+ # Add any paths that contain templates here, relative to this directory.
+ templates_path = ['_templates']
diff --git a/debian/rules b/debian/rules
index 62c708e..eb6f473 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,6 +19,7 @@ override_dh_auto_build:
 	cd docs/sphinx-docs; make html
 	cd docs/sphinx-docs; make info
 	cd docs/sphinx-docs; make man
+	ln -sf /usr/share/javascript/mathjax/ docs/sphinx-docs/build/html/_static/mathjax
 
 override_dh_fixperms:
 	dh_fixperms

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



More information about the debian-science-commits mailing list