Package: macaulay2-jupyter-kernel / 0.6.7~beta-3

nbextension-prefix.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Use prefix for installing nbextension
 Also use realpath since notebook's codemirror is a symlink to the Debian
 codemirror package.
Author: Doug Torrance <dtorrance@piedmont.edu>
Bug: https://github.com/rz839/Macaulay2-Jupyter-Kernel/issues/7
Last-Update: 2021-06-13

--- a/m2_kernel/install.py
+++ b/m2_kernel/install.py
@@ -35,7 +35,9 @@
 
     print("Installing nbextension for syntax highlighting ...")
     install_nbextension('{}/m2-mode'.format(assets_dir),
-            nbextensions_dir='{}/static/components/codemirror/mode/'.format(notebook_dir[0]),
+            nbextensions_dir=os.path.realpath(
+                '{}/static/components/codemirror/mode/'.format(
+                    notebook_dir[0])).replace('/usr', prefix),
             destination='macaulay2', overwrite=True, symlink=False)