[Debian-science-sagemath] widgetsnbextension situation

Ximin Luo infinity0 at debian.org
Thu Nov 10 15:50:00 UTC 2016


Hey all, I took another look at this. The situation is a bit of a mess.

ipywidgets, widgetsnbextension, and jupyter-js-widgets are source-controlled together in git here:

https://github.com/ipython/ipywidgets

Tag 5.2.2 is the one we need for sage 7.4. It contains:

- ipywidgets 5.2.2
- widgetsnbextension 1.2.6 (in widgetsnbextension/_version.py) python package
- widgetsnbextension "1.2.0"[1] (in package.json) npm package, but not uploaded to npm repo
- jupyter-js-widgets 1.2.0

[1] I assume the "1.2.0" is a typo.

You can also take a look at docs/source/dev_install.md for build instructions. Notably, you are supposed to install widgetsnbextension in *both* NPM and pip.

widgetsnbextension (npm, "1.2.0") depends on jupyter-js-widgets (1.2.0), which is uploaded to NPM publicly here:
https://www.npmjs.com/package/jupyter-js-widgets

ipywidgets, widgetsnbextension are themselves distributed on PyPI here:
https://pypi.python.org/pypi/ipywidgets/5.2.2
https://pypi.python.org/pypi/widgetsnbextension/1.2.6

The widgetsnbextension PyPI package embeds jupyter-js-widgets in widgetsnbextension/static/extension.js - either all or in part, I didn't check to that level of detail. This is what Sage 7.4 uses:

https://www.mirrorservice.org/sites/www.sagemath.org/spkg/upstream/widgetsnbextension/index.html

In fact the dependencies Gordon identified previously, belong to the package.json of *jupyter-js-widgets* and not widgetsnbextension:

    "d3-format": "^0.5.1",
    "scriptjs": "^2.5.8",

widgetsnbextension's package.json defines an extra dependency not yet in Debian (that we didn't identify before):

    "html2canvas": "^0.5.0-beta4",

plus some other devDependencies I didn't check yet.

So, what I'm wondering is, is it worth packaging these two things as separate packages?

For Debian's "orig source" purposes, we can't use the widgetsnbextension PyPI package anyway, because it doesn't contain the source code for jupyter-js-widgets. We'd have to repack it from ipywidgets.git. Also the latest version of ipywidgets (6) contains yet another npm package jupyterlab_widgets.

For simplicity, we could just bundle these all into the same Debian source package, yet build separate binary packages out of it. The version numbers would be the same, but we can encode the upstream different-version-numbers within the contents of those packages.

X

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



More information about the Debian-science-sagemath mailing list