summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 5b10802f9151262bab62a9bce1169ea3e9111a49 (plain)
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
#!/usr/bin/make -f
# -*- makefile -*-

## Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export PYBUILD_NAME=lmfit

# copy the tests to the build dir to be able to pass nose
export PYBUILD_BEFORE_TEST=cp -r NIST_STRD {build_dir}
export PYBUILD_AFTER_TEST=rm -fr {build_dir}/NIST_STRD

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

override_dh_clean:
	rm -rf doc/_static/conf_interval2.png
	rm -rf doc/_static/conf_interval.png
	dh_clean

override_dh_auto_build:
	dh_auto_build
	# unactivated, waiting for jupyter_sphinx
	# PYTHONPATH=. http_proxy='localhost' python3 -m sphinx -N -bhtml doc/ build/html  # HTML generator

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	find .pybuild -name build -type d -exec ln -s $(CURDIR)/examples \{\} \;
	dh_auto_test
	find . -name "*.sav" -delete
endif

overwrite_dh_auto_install:
	dh_auto_install
	dh_numpy3

override_dh_installdocs-indep:
	dh_installdocs -i
	# unactivated, waiting for jupyter_sphinx
	# dh_installdocs build/html -p python-lmfit-doc --doc-main-package=python3-lmfit
	# find debian/python-$(PYBUILD_NAME)-doc/usr/share/doc -name "*.html" -type f | xargs sed -i 's;https://cdn[js]*\..*/MathJax.js;_static/MathJax.js;g'
	# ln -s /usr/share/javascript/mathjax/MathJax.js  debian/python-$(PYBUILD_NAME)-doc/usr/share/doc/python-$(PYBUILD_NAME)/html/_static

override_dh_python3:
	dh_python3
	find . -name python3.7 -type d | xargs rm -rf