diff -Nru ipywidgets-6.0.0/debian/changelog ipywidgets-6.0.0/debian/changelog --- ipywidgets-6.0.0/debian/changelog 2019-12-16 19:39:12.000000000 +0000 +++ ipywidgets-6.0.0/debian/changelog 2021-02-05 11:42:20.000000000 +0000 @@ -1,3 +1,24 @@ +ipywidgets (6.0.0-7~ppa20.10~1) groovy; urgency=medium + + [ Ondřej Nový ] + * d/control: Update Maintainer field with new Debian Python Team + contact address. + * d/control: Update Vcs-* fields with new Debian Python Team Salsa + layout. + + [ Gordon Ball ] + * Complete rework the build for this package. It now uses pkg-js-tools and + webpack to (mostly) native build the web extensions, dropping the previous + fakewebpack implementation. + * Fix FTBFS (Closes: #950094, #971224) and dependency bugs (Closes: #979773) + * Drop embedded copies of css-loader, process, setimmediate, style-loader, + timers-browserify. Add (temporarily) embedded copy of @types/underscore. + * Add patches for Typescript 4 and Webpack 4 compatibility + * Standards-Version 4.5.1, Debhelper compat 13 + * PPA snapshot for 20.10 + + -- Gordon Ball Fri, 05 Feb 2021 12:42:20 +0100 + ipywidgets (6.0.0-6) unstable; urgency=medium * To enable ipywidgets in jupyter-notebook, move to dropping a config file diff -Nru ipywidgets-6.0.0/debian/control ipywidgets-6.0.0/debian/control --- ipywidgets-6.0.0/debian/control 2019-12-16 19:39:12.000000000 +0000 +++ ipywidgets-6.0.0/debian/control 2021-02-04 16:55:38.000000000 +0000 @@ -1,26 +1,37 @@ Source: ipywidgets -Maintainer: Debian Python Modules Team +Maintainer: Debian Python Team Uploaders: Gordon Ball , Ximin Luo Section: python Priority: optional -Standards-Version: 4.0.1 +Standards-Version: 4.5.1 Homepage: https://github.com/jupyter-widgets/ipywidgets -Build-Depends: debhelper-compat (= 10), +Build-Depends: debhelper-compat (= 13), dh-python, + pkg-js-tools, + fonts-font-awesome, + libjs-mathjax, + libjs-sizzle, + node-ajv, + node-css-loader, + node-file-loader, + node-url-loader, + node-expect.js, node-recast, - libjs-jquery, - libjs-jquery-ui, + node-process, + node-requirejs, + node-sinon, + node-style-loader, + node-jquery, + node-jquery-ui, node-backbone, node-d3-format (>= 1:1.4.1-1), node-es6-promise (>= 4.2.8-4), node-semver (>= 6.3.0-1), node-typescript, - node-typescript-types (>= 20190926-1), node-underscore, - patch, python3-all, python3-pytest, - python3-setuptools (>= 28), + python3-setuptools, python3-coverage, python3-ipython, python3-ipykernel, @@ -31,9 +42,9 @@ python3-sphinx, python3-sphinx-rtd-theme, pandoc, - m4 -Vcs-Git: https://salsa.debian.org/python-team/modules/ipywidgets.git -Vcs-Browser: https://salsa.debian.org/python-team/modules/ipywidgets + webpack, +Vcs-Git: https://salsa.debian.org/python-team/packages/ipywidgets.git +Vcs-Browser: https://salsa.debian.org/python-team/packages/ipywidgets Package: python3-ipywidgets Architecture: all @@ -70,7 +81,7 @@ Depends: ${misc:Depends} Recommends: jupyter-notebook Suggests: python3-ipywidgets -Built-Using: ${fakewebpack:Built-Using} +Built-Using: ${js:Built-Using} Description: Interactive widgets - Jupyter notebook extension Notebooks come alive when interactive widgets are used. Learning becomes an immersive and fun experience. Researchers can easily see how changing inputs diff -Nru ipywidgets-6.0.0/debian/copyright ipywidgets-6.0.0/debian/copyright --- ipywidgets-6.0.0/debian/copyright 2019-12-16 19:39:12.000000000 +0000 +++ ipywidgets-6.0.0/debian/copyright 2021-02-04 16:55:38.000000000 +0000 @@ -15,16 +15,6 @@ License: BSD-3-clause Comment: from https://www.npmjs.com/package/@jupyterlab/services version 0.35.0 -Files: debian/missing-sources/css-loader/* -Copyright: 2015-2016 Tobias Koppers -License: MIT -Comment: from https://github.com/webpack/css-loader - -Files: debian/missing-sources/style-loader/* -Copyright: 2015-2016 Tobias Koppers -License: MIT -Comment: from https://github.com/webpack/style-loader - Files: debian/missing-sources/phosphor/* Copyright: 2014-2016 PhosphorJS Contributors License: BSD-3-clause @@ -34,25 +24,15 @@ with https://github.com/phosphorjs/phosphor/commit/5f6f8828ed20a341d7e41871edd806734dac71f6 and minimal changes to work with typescript 3.2 -Files: debian/missing-sources/process/* -Copyright: 2013-2016 Roman Shtylman -License: MIT -Comment: from https://github.com/defunctzombie/node-process - Files: debian/missing-sources/scriptjs/* Copyright: 2014-2016 Dustin Diaz License: MIT Comment: from https://github.com/ded/script.js -Files: debian/missing-sources/setimmediate/* -Copyright: 2012-2016 Domenic Denicola -License: MIT -Comment: from https://github.com/YuzuJS/setImmediate - -Files: debian/missing-sources/timers-browserify/* -Copyright: 2012-2016 J. Ryan Stinnett +Files: debian/missing-sources/@types/underscore +Copyright: Microsoft Corporation License: MIT -Comment: from https://github.com/jryans/timers-browserify +Comment: from https://www.npmjs.com/package/@types/underscore version 1.9.1 License: BSD-3-clause All rights reserved. diff -Nru ipywidgets-6.0.0/debian/fakewebpack-extract-source-map.py ipywidgets-6.0.0/debian/fakewebpack-extract-source-map.py --- ipywidgets-6.0.0/debian/fakewebpack-extract-source-map.py 2019-12-16 19:39:12.000000000 +0000 +++ ipywidgets-6.0.0/debian/fakewebpack-extract-source-map.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#!/usr/bin/python3 -# Extract sourcesContent from a javascript source map produced by webpack. -# -# Usage: $0 > -# - -import json -import os -import re -import sys - -PREFIX = "webpack:///" -FOOTER = re.compile(r"^(.*)\n\n/*\n/[\*/][\s\*]* WEBPACK FOOTER.*$", re.DOTALL) - -remove_footer = True - - -def main(fn, outdir, *args): - with open(fn) as fp: - j = json.load(fp) - pairs = zip(j["sources"], j["sourcesContent"]) - for f, c in pairs: - if f.startswith(PREFIX): - p = f[len(PREFIX):].replace("/~/", "/node_modules/") - assert not os.path.isabs(p) - print(p) - p = os.path.join(outdir, p) - dirname, basename = os.path.split(p) - if dirname: - os.makedirs(dirname, exist_ok=True) - if remove_footer: - c = re.sub(FOOTER, "\\1", c) - with open(p, 'w') as wfp: - wfp.write(c) - else: - print("unrecognised; ignoring: %s" % f, file=sys.stderr) - - -if __name__ == "__main__": - sys.exit(main(*sys.argv[1:])) diff -Nru ipywidgets-6.0.0/debian/fakewebpack-generate.py ipywidgets-6.0.0/debian/fakewebpack-generate.py --- ipywidgets-6.0.0/debian/fakewebpack-generate.py 2019-12-16 19:39:12.000000000 +0000 +++ ipywidgets-6.0.0/debian/fakewebpack-generate.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,97 +0,0 @@ -#!/usr/bin/python3 -# Regenerate output from a file_list produced by fakewebpack-extract-source-map -# -# Usage: $0 > -# - -import ast -import os -import shlex -import subprocess -import sys - -""" -TODO: -inject-process: 25 - -""" - -RETRIES = int(os.getenv("FAKEWEBPACK_INTERACTIVE_RETRY", 0)) -JSPROC = os.path.join(os.path.dirname(__file__), "fakewebpack-postprocess.js") - -AMD_PREFIX = "define(function() { return " -AMD_SUFFIX = "});" - -BOOTSTRAP_PREFIX = "/******/ (function(modules) { // webpackBootstrap" -BOOTSTRAP_LINE_PREFIX = "/******/" -BOOTSTRAP_MODULE_START = """/******/ }) -/************************************************************************/ -/******/ ([""" -BOOTSTRAP_SUFFIX = "/******/ ])" - -MODULE_PREFIX_REQ = "/***/ function(module, exports, __webpack_require__) {\n" -MODULE_PREFIX_NOREQ = "/***/ function(module, exports) {\n" -MODULE_LINE_PREFIX = " " -MODULE_SUFFIX = "/***/ }" - - -def main(file_list, module_list, srcdir, amd, *args): - amd = ast.literal_eval(amd) - mod_idx = 0 - with open(file_list) as fp: - lines = fp.readlines() - if amd: - print(AMD_PREFIX, end='') - for f in lines: - fnn = f.rstrip() - fn = os.path.join(srcdir, fnn) - if "webpack/bootstrap" in f: - print(BOOTSTRAP_PREFIX) - with open(fn) as rfp: - for line in rfp.readlines(): - print(BOOTSTRAP_LINE_PREFIX +line, end="") - print(BOOTSTRAP_MODULE_START) - else: - cmdline = ["nodejs", - os.path.relpath(JSPROC, srcdir), - fnn, - os.path.relpath(module_list, srcdir)] - changed = False - i = 0 - for i in range(RETRIES +1): - try: - print("module %02d: %s" % (mod_idx, " ".join(map(shlex.quote, cmdline))), file=sys.stderr) - c = subprocess.check_output( - cmdline, - cwd=srcdir).decode("utf-8") - break - except subprocess.CalledProcessError: - if i < RETRIES: - print("now edit %s to fix the above error, and hit enter to try again. (%s/%s)" % - (module_list, i, RETRIES), file=sys.stderr) - input() - continue - else: - raise - print("/* %s */" % mod_idx) - if c: - changed = True - else: # nothing changed, use the plain file - with open(fn, 'rb') as rfp: - c = rfp.read().decode("utf-8") - print(MODULE_PREFIX_REQ if changed else MODULE_PREFIX_NOREQ) - for line in c.splitlines(keepends=True): - print(MODULE_LINE_PREFIX +line, end="") - print() - print() - # not off-by-1, len(lines) should be 1+num_modules, including the bootstrap code - print(MODULE_SUFFIX + ("," if mod_idx < len(lines) -2 else "")) - mod_idx += 1 - print(BOOTSTRAP_SUFFIX, end='') - if amd: - print(AMD_SUFFIX, end='') - print(';') - - -if __name__ == "__main__": - sys.exit(main(*sys.argv[1:])) diff -Nru ipywidgets-6.0.0/debian/fakewebpack-helpers/css-loader-pack.py ipywidgets-6.0.0/debian/fakewebpack-helpers/css-loader-pack.py --- ipywidgets-6.0.0/debian/fakewebpack-helpers/css-loader-pack.py 2019-12-16 19:39:12.000000000 +0000 +++ ipywidgets-6.0.0/debian/fakewebpack-helpers/css-loader-pack.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -#!/usr/bin/python3 - -import json -import os -import re -import sys - -# Try to emulate what webpack+css-loader does; they treat '#xxx' parts in URLs specially -CSS_URL = re.compile(r"""url\((?:\\")?(.*?)(\??#.*?)?(?:\\")?\)""") - -template = """exports = module.exports = require("%s/css-loader/lib/css-base.js")(); -// imports - - -// module -exports.push([module.id, %%s, ""]); - -// exports -""" % os.getenv("NODE_PATH") - - -def replace(match): - if match.group(1).startswith("data:"): - return match.group(0) - path = match.group(1) if match.group(1).startswith( - ".") else os.path.join(".", match.group(1)) - return """url(" + require("%s") + "%s)""" % (path, match.group(2)) - - -f = sys.stdin.read() -print(template % re.sub(CSS_URL, replace, json.dumps(f))) diff -Nru ipywidgets-6.0.0/debian/fakewebpack-helpers/style-loader.js.m4 ipywidgets-6.0.0/debian/fakewebpack-helpers/style-loader.js.m4 --- ipywidgets-6.0.0/debian/fakewebpack-helpers/style-loader.js.m4 2019-12-16 19:39:12.000000000 +0000 +++ ipywidgets-6.0.0/debian/fakewebpack-helpers/style-loader.js.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -// style-loader: Adds some css to the DOM by adding a