[sagemath] 01/01: Fix threejs offline paths for Debian
Ximin Luo
infinity0 at debian.org
Tue Jun 13 18:30:38 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository sagemath.
commit 145e29e488a562ad5737df659ebe730bae8f7ec3
Author: Ximin Luo <infinity0 at debian.org>
Date: Tue Jun 13 20:30:25 2017 +0200
Fix threejs offline paths for Debian
---
debian/patches/d0-threejs-offline-paths.patch | 43 +++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 44 insertions(+)
diff --git a/debian/patches/d0-threejs-offline-paths.patch b/debian/patches/d0-threejs-offline-paths.patch
new file mode 100644
index 0000000..19c7569
--- /dev/null
+++ b/debian/patches/d0-threejs-offline-paths.patch
@@ -0,0 +1,43 @@
+--- a/sage/src/sage/repl/rich_output/backend_ipython.py
++++ b/sage/src/sage/repl/rich_output/backend_ipython.py
+@@ -411,11 +411,10 @@
+ sage: backend.threejs_offline_scripts()
+ '...<script ...</script>...'
+ """
+- from sage.env import SAGE_SHARE
+ return """
+ <script src="{0}/threejs/three.min.js"></script>
+-<script src="{0}/threejs/OrbitControls.js"></script>
+- """.format(SAGE_SHARE)
++<script src="{0}/threejs/examples/js/controls/OrbitControls.js"></script>
++ """.format("file:///usr/share/javascript")
+
+
+ IFRAME_TEMPLATE = \
+@@ -590,12 +589,7 @@
+ sage: backend.threejs_offline_scripts()
+ '...<script src="/nbextensions/threejs/three.min...<\\/script>...'
+ """
+- from sage.repl.rich_output import get_display_manager
+- CDN_scripts = get_display_manager().threejs_scripts(online=True)
+ return """
+ <script src="/nbextensions/threejs/three.min.js"></script>
+-<script src="/nbextensions/threejs/OrbitControls.js"></script>
+-<script>
+- if ( !window.THREE ) document.write('{}');
+-</script>
+- """.format(CDN_scripts.replace('</script>', r'<\/script>'))
++<script src="/nbextensions/threejs/examples/js/controls/OrbitControls.js"></script>
++ """
+--- a/sage/src/sage/repl/rich_output/backend_sagenb.py
++++ b/sage/src/sage/repl/rich_output/backend_sagenb.py
+@@ -468,5 +468,7 @@
+ sage: backend.threejs_offline_scripts()
+ '...<script ...</script>...'
+ """
+- from sage.repl.rich_output import get_display_manager
+- return get_display_manager().threejs_scripts(online=True)
++ return """
++<script src="/threejs/three.min.js"></script>
++<script src="/threejs/examples/js/controls/OrbitControls.js"></script>
++ """
diff --git a/debian/patches/series b/debian/patches/series
index b092cd0..7514e3f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -37,6 +37,7 @@ d0-singular.patch
d0-disable-jsmol.patch
d0-paths-sharedata.patch
d0-paths.patch
+d0-threejs-offline-paths.patch
# Patch Sage to behave as a Debian package
# Not suitable for upstreaming
--
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