File: rules

package info (click to toggle)
python-biom-format 2.1.5%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 51,844 kB
  • ctags: 1,341
  • sloc: python: 11,620; makefile: 128; sh: 65
file content (37 lines) | stat: -rwxr-xr-x 1,226 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
#!/usr/bin/make -f

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

export PYBUILD_NAME=biom-format
export PYBUILD_DESTDIR_python2=debian/python-$(PYBUILD_NAME)
export PYBUILD_DESTDIR_python3=debian/python3-$(PYBUILD_NAME)
export PYBUILD_AFTER_INSTALL_python2=dh_numpy
export PYBUILD_AFTER_INSTALL_python3=dh_numpy3
export PYBUILD_BEFORE_TEST=cp -r {dir}/examples {dir}/tests {build_dir}

## When trying better hardening the build fails
# export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

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

override_dh_auto_build:
	# arch
	USE_CYTHON=true dh_auto_build
	# indep:
	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -b html doc build/html
	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -b man doc build/man

override_dh_auto_install:
	dh_auto_install
	# Install command-line scripts in separate tools package.
	dh_install --sourcedir=$(PYBUILD_DESTDIR_python3) \
		--package=$(PYBUILD_NAME)-tools usr/bin
	rm -rf $(PYBUILD_DESTDIR_python2)/usr/bin
	rm -rf $(PYBUILD_DESTDIR_python3)/usr/bin

override_dh_installdocs-indep:
	dh_installdocs --indep
	dh_sphinxdoc --indep