File: rules

package info (click to toggle)
jupyter-notebook 6.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 13,444 kB
  • sloc: javascript: 23,377; python: 15,064; makefile: 252; sh: 66
file content (147 lines) | stat: -rwxr-xr-x 5,485 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#!/usr/bin/make -f

JSBASE:=/usr/share/javascript
COMP:=notebook/static/components
JSUSING:=libjs-underscore libjs-backbone libjs-jed libjs-jquery libjs-jquery-ui libjs-bootstrap libjs-bootstrap-tour libjs-moment libjs-codemirror libjs-jquery-typeahead libjs-xterm libjs-requirejs libjs-requirejs-text node-react node-fbjs node-object-assign node-loose-envify
BUILTUSING:=$(foreach jspkg, $(JSUSING), $(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W $(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
# selenium tests require extra dependencies
# test_notebookapp_integration tries to invoke jupyter-notebook which isn't in the PATH when this runs
export PYBUILD_TEST_ARGS=--ignore=notebook/tests/selenium -k 'not notebookapp_integration'


%:
	dh $@ --with=python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_configure:
	#backbone
	mkdir -p $(COMP)/backbone
	ln -s $(JSBASE)/backbone/backbone.min.js $(COMP)/backbone/backbone-min.js

	#bootstrap
	mkdir -p $(COMP)/bootstrap
	ln -s $(JSBASE)/bootstrap $(COMP)/bootstrap/dist
	ln -s $(JSBASE)/bootstrap/less $(COMP)/bootstrap/

	#bootstrap-tour
	mkdir -p $(COMP)/bootstrap-tour/build/js
	mkdir -p $(COMP)/bootstrap-tour/build/css
	ln -s $(JSBASE)/bootstrap-tour/bootstrap-tour.min.js $(COMP)/bootstrap-tour/build/js/
	ln -s $(JSBASE)/bootstrap-tour/bootstrap-tour.min.css $(COMP)/bootstrap-tour/build/css/

	#codemirror
	ln -s $(JSBASE)/codemirror $(COMP)/

	#es6-promise
	mkdir -p $(COMP)/es6-promise
	ln -s $(JSBASE)/es6-promise/es6-promise.min.js $(COMP)/es6-promise/promise.min.js
	ln -s $(JSBASE)/es6-promise/es6-promise.js $(COMP)/es6-promise/promise.js
	ln -s $(JSBASE)/es6-promise/es6-promise.min.js $(COMP)/es6-promise/es6-promise.min.js
	ln -s $(JSBASE)/es6-promise/es6-promise.js $(COMP)/es6-promise/es6-promise.js

	#jed
	ln -s $(JSBASE)/jed $(COMP)/

	#jquery
	ln -s $(JSBASE)/jquery $(COMP)/

	#jquery-typeahead
	mkdir -p $(COMP)/jquery-typeahead
	ln -s $(JSBASE)/jquery-typeahead $(COMP)/jquery-typeahead/dist

	#jquery-ui
	mkdir -p $(COMP)/jquery-ui/themes/smoothness
	ln -s $(JSBASE)/jquery-ui/jquery-ui.min.js $(COMP)/jquery-ui/
	ln -s $(JSBASE)/jquery-ui/themes/base/jquery-ui.min.css $(COMP)/jquery-ui/themes/smoothness/
	ln -s $(JSBASE)/jquery-ui/themes/base/images $(COMP)/jquery-ui/themes/smoothness/

	#marked
	mkdir -p $(COMP)/marked/lib
	ln -s $(JSBASE)/marked/marked.js $(COMP)/marked/lib/

	#mathjax
	ln -s $(JSBASE)/mathjax $(COMP)/MathJax

	#moment
	mkdir -p $(COMP)/moment/min
	ln -s $(JSBASE)/moment/moment.js $(COMP)/moment/
	ln -s $(JSBASE)/moment/moment-with-locales.js $(COMP)/moment/
	ln -s $(JSBASE)/moment/moment-with-locales.min.js $(COMP)/moment/min/moment-with-locales.js

	#requirejs
	ln -s $(JSBASE)/requirejs $(COMP)/

	#requirejs-plugins
	cp -r debian/missing-sources/requirejs-plugins $(COMP)/

	#requirejs-text
	mkdir -p $(COMP)/requirejs-text
	ln -s $(JSBASE)/requirejs/text.js $(COMP)/requirejs-text/

	#xterm.js
	mkdir -p $(COMP)/xterm.js $(COMP)/xterm.js-css $(COMP)/xterm.js-fit
	ln -s $(JSBASE)/xterm/xterm.js $(COMP)/xterm.js/index.js
	ln -s $(JSBASE)/xterm/xterm.css $(COMP)/xterm.js-css/index.css
	ln -s $(JSBASE)/xterm/addons/fit/fit.js $(COMP)/xterm.js-fit/index.js

	#text-encoding
	mkdir -p $(COMP)/text-encoding/lib
	ln -s $(JSBASE)/text-encoding/encoding.js $(COMP)/text-encoding/lib/

	#underscore
	mkdir -p $(COMP)/underscore
	ln -s $(JSBASE)/underscore/underscore.min.js $(COMP)/underscore/underscore-min.js

	#font-awesome
	ln -s /usr/share/fonts-font-awesome $(COMP)/font-awesome

	#google-caja
	mkdir -p $(COMP)/google-caja
	cat debian/missing-sources/css-defs.js \
	    debian/missing-sources/csslexer.js \
	    debian/missing-sources/uri.js \
	    debian/missing-sources/sanitizecss.js \
	    debian/missing-sources/cssparser.js \
	    debian/missing-sources/html4-defs.js \
	    debian/missing-sources/html-sanitizer.js \
	    > debian/missing-sources/html-css-sanitizer-bundle.js
	uglifyjs -o $(COMP)/google-caja/html-css-sanitizer-minified.js \
	            debian/missing-sources/html-css-sanitizer-bundle.js

    #react
	mkdir -p $(COMP)/react
	# copy these files, since there isn't a libjs-react, which means we'd pull in the dependencies
	# of a full nodejs environment
	cp /usr/share/nodejs/react/umd/react.production.min.js $(COMP)/react/react.production.min.js
	cp /usr/share/nodejs/react-dom/umd/react-dom.production.min.js $(COMP)/react/react-dom.production.min.js

	#create-react-class
	mkdir -p $(COMP)/create-react-class
	cd debian/missing-sources/create-react-class && NODE_ENV=production webpack
	cp debian/missing-sources/create-react-class/dist/create-react-class.min.js $(COMP)/create-react-class/index.js

	dh_auto_configure


override_dh_auto_build:
	dh_auto_build
ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
	PYTHONPATH=. http_proxy='127.0.0.9' https_proxy='127.0.0.9' python3 -m sphinx -N -bhtml docs/source/ build/html
endif

override_dh_auto_clean:
	dh_auto_clean
	$(RM) notebook/static/*/js/main.*.js
	$(RM) notebook/static/*/js/main.*.js.map

override_dh_gencontrol:
	echo "js:Built-Using=$(BUILTUSING)" >> debian/python3-notebook.substvars
	dh_gencontrol

override_dh_installchangelogs:
	dh_installchangelogs -k docs/source/changelog.rst

override_dh_installsystemduser:
	dh_installsystemduser --no-enable