[Debian-science-sagemath] widgetsnbextension situation

Ximin Luo infinity0 at debian.org
Tue Nov 15 01:21:00 UTC 2016


Ximin Luo:
> Julien Puydt:
>> Can you remind us what the list of necessary javascript looks like?
> 
> See
> 
> https://github.com/ipython/ipywidgets/blob/5.2.2/jupyter-js-widgets/package.json
> https://github.com/ipython/ipywidgets/blob/5.2.2/widgetsnbextension/package.json
> 
> I looked through the dependencies, if I remember right Debian has all of them except:
> 
>     "d3-format": "^0.5.1",
>     "scriptjs": "^2.5.8",
>     "html2canvas": "^0.5.0-beta4",
> 
> I did not yet look at the devDependencies.
> 
> To install it yourself "the upstream way" completely from source (i.e. what we need to put in d/rules), see
> 
> https://github.com/ipython/ipywidgets/blob/5.2.2/docs/source/dev_install.md
> 

I can confirm that the upstream instructions do work to regenerate widgetsnbextension/static/extension.js from https://pypi.python.org/pypi/widgetsnbextension/1.2.6

However we're going to have a hard time recreating it in Debian. I went through this file and saw the "real dependencies". scriptjs seems to not be needed, but the others are.

There are 56 modules (0-55) that webpack concatenates together, they are:

External:
2: underscore
3: backbone 1.3.3
4: jquery
7: jquery-ui
8: commonjs/grunt magic, easy to recreate manually
9-20: bootstrap 3.3.6 (transition, alert, button, carousel, collapse, dropdown, modal, tooltip, popover, scrollspy, tab, affix; all in Debian as v3.3.7)
24: backbone 1.2.0, LOL
25: node-semver
*26: stub file from node-process, "shim for using process in browser"
*38: d3format
*45: html2canvas
52: possibly node-style-loader, not sure
*54: node-css-loader
*55: node-style-loader

*not in Debian

Local, part of juypter-js-widgets / nbwidgetsextension:
0: local code
1: local code
5: local code
6: local code
21-23: -- local code 
27: jupyter-js-widgets's package.json
28-37: local code
39-44: local code
46-48: local code
49: widgetsnbextension's package.json
50, 51: local code
53: local code, minified version of widgets.css

> widgetsnbextension at 1.2.0 build /home/infinity0/ipywidgets/widgetsnbextension
> webpack

Hash: eba3724d55e00a80e9ec
Version: webpack 1.13.3
Time: 2533ms
           Asset     Size  Chunks             Chunk Names
    extension.js  1.44 MB       0  [emitted]  main
extension.js.map  1.75 MB       0  [emitted]  main
   [0] ./src/extension.js 3.02 kB {0} [built]
   [1] ./src/manager.js 26.2 kB {0} [built]
  [46] ./src/progress-modal.js 3.23 kB {0} [built]
  [47] ./src/save_state.js 1.11 kB {0} [built]
  [48] ./src/embed_widgets.js 2.01 kB {0} [built]
  [50] ./src/widgetarea.js 5.1 kB {0} [built]
  [51] ./src/widget_output.js 2.28 kB {0} [built]
    + 49 hidden modules

There is also ipywidgets.git/jupyter-js-widgets/dist/embed.js which is 74 modules, which I haven't yet analysed. We don't strictly need that for widgetsnbextension; for SageMath we could just omit the jupyter-js-widgets binary package.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



More information about the Debian-science-sagemath mailing list