[Python-modules-commits] [jupyter-notebook] 02/02: Add Built-Using header for amalgamated javascript

Gordon Ball chronitis-guest at moszumanska.debian.org
Fri Nov 11 21:35:37 UTC 2016


This is an automated email from the git hooks/post-receive script.

chronitis-guest pushed a commit to branch master
in repository jupyter-notebook.

commit 61f84176a65dc53da52f0104745efd4a7b391547
Author: Gordon Ball <gordon at chronitis.net>
Date:   Fri Nov 11 20:12:52 2016 +0100

    Add Built-Using header for amalgamated javascript
---
 debian/README.source | 9 +++++++++
 debian/control       | 3 +++
 debian/rules         | 7 +++++++
 3 files changed, 19 insertions(+)

diff --git a/debian/README.source b/debian/README.source
index 040ed51..879e710 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -48,3 +48,12 @@ dependencies
 There is an explicit dependency on python{,3}-terminado which is listed as a
 platform-specific requirement in setup.py, which it appears pybuild doesn't
 interpret.
+
+Built-Using
+-----------
+
+A subset of the libjs-* packages depended upon are combined into a minified
+amalgamation at build time (see tools/build-main.js). These are listed in
+Built-Using for the relevant binary packages. Note while the javascript is
+amalgamated, other resources (eg, CSS) for these packages are still loaded
+from separate files.
diff --git a/debian/control b/debian/control
index 358bd76..8e4cfa5 100644
--- a/debian/control
+++ b/debian/control
@@ -87,6 +87,7 @@ Depends: ${misc:Depends},
 Recommends: python-ipywidgets,
             python-ipykernel
 Suggests: python-notebook-doc
+Built-Using: ${js:Built-Using}
 Description: Jupyter interactive notebook (Python 2)
  The Jupyter Notebook is a web application that allows you to create and
  share documents that contain live code, equations, visualizations, and
@@ -122,6 +123,7 @@ Depends: ${misc:Depends},
 Recommends: python3-ipywidgets,
             python3-ipykernel
 Suggests: python-notebook-doc
+Built-Using: ${js:Built-Using}
 Description: Jupyter interactive notebook (Python 3)
  The Jupyter Notebook is a web application that allows you to create and
  share documents that contain live code, equations, visualizations, and
@@ -137,6 +139,7 @@ Section: doc
 Depends: ${misc:Depends},
          ${sphinxdoc:Depends},
          libjs-mathjax
+Built-Using: ${sphinxdoc:Built-Using}
 Description: Jupyter interactive notebook (documentation)
  The Jupyter Notebook is a web application that allows you to create and
  share documents that contain live code, equations, visualizations, and
diff --git a/debian/rules b/debian/rules
index 5b96c87..26b49b7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,8 @@
 
 JSBASE:=/usr/share/javascript
 COMP:=notebook/static/components
+JSUSING:=underscore backbone jquery jquery-ui bootstrap bootstrap-tour moment codemirror term.js jquery-typeahead
+BUILTUSING:=$(foreach jspkg, $(JSUSING), $(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W libjs-$(jspkg)))
 
 export PYBUILD_AFTER_INSTALL=rm -rf '{destdir}/{install_dir}/notebook/static/components' ; cp -r notebook/static/components '{destdir}/{install_dir}/notebook/static/' ; rm -rf '{destdir}/{install_dir}/notebook/tests'
 export LC_ALL=C.UTF-8
@@ -97,3 +99,8 @@ override_dh_auto_build:
 ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
 	PYTHONPATH=. http_proxy='127.0.0.9' sphinx-build -N -bhtml docs/source/ build/html
 endif
+
+override_dh_gencontrol:
+	echo "js:Built-Using=$(BUILTUSING)" >> debian/python-notebook.substvars
+	echo "js:Built-Using=$(BUILTUSING)" >> debian/python3-notebook.substvars
+	dh_gencontrol

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/jupyter-notebook.git



More information about the Python-modules-commits mailing list