sage: use slightly more robust way of getting threejs version
This commit is contained in:
parent
7efa803a4b
commit
4718aea896
@ -0,0 +1,16 @@
|
|||||||
|
diff --git a/src/sage/repl/rich_output/display_manager.py b/src/sage/repl/rich_output/display_manager.py
|
||||||
|
index fb21f7a9c9..f39470777d 100644
|
||||||
|
--- a/src/sage/repl/rich_output/display_manager.py
|
||||||
|
+++ b/src/sage/repl/rich_output/display_manager.py
|
||||||
|
@@ -749,9 +749,9 @@ class DisplayManager(SageObject):
|
||||||
|
import sage.env
|
||||||
|
import re
|
||||||
|
import os
|
||||||
|
- with open(os.path.join(sage.env.THREEJS_DIR, 'build', 'three.min.js')) as f:
|
||||||
|
+ with open(os.path.join(sage.env.THREEJS_DIR, 'build', 'three.js')) as f:
|
||||||
|
text = f.read().replace('\n','')
|
||||||
|
- version = re.search(r'REVISION="(\d+)"', text).group(1)
|
||||||
|
+ version = re.search(r"REVISION = '(\d+)'", text).group(1)
|
||||||
|
return """
|
||||||
|
<script src="https://cdn.jsdelivr.net/gh/mrdoob/three.js@r{0}/build/three.min.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/gh/mrdoob/three.js@r{0}/examples/js/controls/OrbitControls.js"></script>
|
@ -109,6 +109,9 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
# fix test output with sympy 1.7 (https://trac.sagemath.org/ticket/30985)
|
# fix test output with sympy 1.7 (https://trac.sagemath.org/ticket/30985)
|
||||||
./patches/sympy-1.7-update.patch
|
./patches/sympy-1.7-update.patch
|
||||||
|
|
||||||
|
# workaround until we use sage's fork of threejs, which contains a "version" file
|
||||||
|
./patches/dont-grep-threejs-version-from-minified-js.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;
|
patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user