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
7474# To clean out generated files, run:
7575npm run clean
7676
77+ # To symlink the jupyter lab extension
78+ jupyter labextension develop .. --overwrite
79+
80+
7781```
Original file line number Diff line number Diff line change @@ -8,6 +8,25 @@ from __future__ import absolute_import
88from { { module.pyRelativePath } } import *
99{ {/each} }
1010
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+
1130def _jupyter_nbextension_paths():
1231 return [{
1332 ' section' : ' notebook' ,
Original file line number Diff line number Diff line change 1616from setuptools import setup
1717
1818
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'])
2224
2325LONG_DESCRIPTION = 'A Python/ThreeJS bridge utilizing the Jupyter widget infrastructure.'
2426
You can’t perform that action at this time.
0 commit comments