File: rules

package info (click to toggle)
pyregion 2.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,764 kB
  • sloc: python: 1,738; makefile: 126; ansic: 104
file content (31 lines) | stat: -rwxr-xr-x 953 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
#!/usr/bin/make -f

#export DH_VERBOSE=1

# For c/cpp elements within package.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export PYBUILD_NAME=pyregion

SPHINXOPTS := -D today="$(BUILD_DATE)" -D html_last_updated_fmt="$(BUILD_DATE)" -D html_show_copyright=0

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

override_dh_auto_install:
	sed -i "s#https.*modernizr\.#/usr/share/javascript/modernizr/modernizr\.#" build/html/*.html
	rm -rf build/html/plot_directive
	sed -i "s#_images#examples#g" build/html/examples.html
	rm -f build/html/_images/demo_region*
	sed -i "s#_images/\(region_draw\|demo\)#figures/\1#g" build/html/getting_started.html
	rm -f build/html/_images/region_draw*
	rm -f build/html/_images/demo_filter_mask.png
	dh_auto_install
	dh_numpy3

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. sphinx-build $(SPHINXOPTS) -N -bhtml docs/ build/html

execute_after_dh_link-indep:
	jdupes -rl debian/python-pyregion-doc/usr