File tree Expand file tree Collapse file tree 3 files changed +28
-3
lines changed Expand file tree Collapse file tree 3 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -74,4 +74,8 @@ jupyter nbextension install --py --symlink --sys-prefix pythreejs
74
74
# To clean out generated files, run:
75
75
npm run clean
76
76
77
+ # To symlink the jupyter lab extension
78
+ jupyter labextension develop .. --overwrite
79
+
80
+
77
81
```
Original file line number Diff line number Diff line change @@ -8,6 +8,25 @@ from __future__ import absolute_import
8
8
from { { module.pyRelativePath } } import *
9
9
{ {/each} }
10
10
11
+
12
+ def _prefix():
13
+ import sys
14
+ from pathlib import Path
15
+ prefix = sys.prefix
16
+ here = Path(__file__).parent
17
+ # for when in dev mode
18
+ if (here.parent / 'setup.py').exists():
19
+ prefix = here.parent
20
+ return prefix
21
+
22
+
23
+ def _jupyter_labextension_paths():
24
+ return [{
25
+ ' src' : f' {_prefix()}/share/jupyter/labextensions/{npm_pkg_name}/' ,
26
+ ' dest' : f' {npm_pkg_name}' ,
27
+ } ]
28
+
29
+
11
30
def _jupyter_nbextension_paths():
12
31
return [{
13
32
' section' : ' notebook' ,
Original file line number Diff line number Diff line change 16
16
from setuptools import setup
17
17
18
18
19
- log .set_verbosity (log .DEBUG )
20
- log .info ('setup.py entered' )
21
- log .info ('$PATH=%s' % os .environ ['PATH' ])
19
+ # due to https://github.com/jupyterlab/jupyterlab/blob/136d2ec216ebfc429a696e6ee75fee5f8ead73e2/jupyterlab/federated_labextensions.py#L347
20
+ # we should not print out anything, otherwise setup.py --name gives noise
21
+ # log.set_verbosity(log.DEBUG)
22
+ # log.info('setup.py entered')
23
+ # log.info('$PATH=%s' % os.environ['PATH'])
22
24
23
25
LONG_DESCRIPTION = 'A Python/ThreeJS bridge utilizing the Jupyter widget infrastructure.'
24
26
You can’t perform that action at this time.
0 commit comments