~ubuntu-branches/ubuntu/raring/ipython/raring

« back to all changes in this revision

Viewing changes to debian/patches/use-system-mathjax-if-available.patch

  • Committer: Package Import Robot
  • Author(s): Julian Taylor
  • Date: 2012-06-30 15:05:32 UTC
  • mfrom: (1.2.18) (6.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20120630150532-c95s7y8qek15kdbo
Tags: 0.13-1
* New upstream release
  No repackging necessary anymore, js sources available in external
  minified variants are not installed
* refresh patches, drop upstream applied full-qt-imports 
* add except-shadows-builtin-fix.patch
* drop libjs-jquery-ui dependency, use the embedded development branch
* don't compress the examples
* remove executable permissions on embedded codemirror files
* build with LC_ALL=C.UTF-8 to avoid a unicode issue in setupbase.py
* remove generated doc images in clean
* update copyright with new and removed files
* remove unreachable Stephan Peijnik from uploaders
  thank you for your work

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
--- a/IPython/frontend/html/notebook/notebookapp.py
10
10
+++ b/IPython/frontend/html/notebook/notebookapp.py
11
 
@@ -105,6 +105,11 @@
12
 
             (r"/notebooks/%s" % _notebook_id_regex, NotebookHandler),
13
 
             (r"/rstservice/render", RSTHandler)
 
11
@@ -140,6 +140,11 @@
 
12
             (r"/clusters/%s/%s" % (_profile_regex, _cluster_action_regex), ClusterActionHandler),
 
13
             (r"/clusters/%s" % _profile_regex, ClusterProfileHandler),
14
14
         ]
15
15
+
16
16
+        if os.path.exists("/usr/share/javascript/mathjax/MathJax.js"):
20
20
         settings = dict(
21
21
             template_path=os.path.join(os.path.dirname(__file__), "templates"),
22
22
             static_path=os.path.join(os.path.dirname(__file__), "static"),
23
 
@@ -284,6 +289,9 @@
 
23
@@ -367,6 +372,9 @@
24
24
         if os.path.exists(os.path.join(static_path, 'mathjax', "MathJax.js")):
25
25
             self.log.info("Using local MathJax")
26
 
             return u"static/mathjax/MathJax.js"
 
26
             return static_url_prefix+u"mathjax/MathJax.js"
27
27
+        elif os.path.exists("/usr/share/javascript/mathjax/MathJax.js"):
28
28
+            self.log.info("Using system MathJax")
29
 
+            return u"mathjax/MathJax.js"
 
29
+            return u"/mathjax/MathJax.js"
30
30
         else:
31
 
             self.log.info("Using MathJax from CDN")
32
 
             return u"http://cdn.mathjax.org/mathjax/latest/MathJax.js"
 
31
             if self.certfile:
 
32
                 # HTTPS: load from Rackspace CDN, because SSL certificate requires it