File: rules

package info (click to toggle)
python-biom-format 2.1.12-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 51,884 kB
  • sloc: python: 13,429; makefile: 145; sh: 99; javascript: 45
file content (49 lines) | stat: -rwxr-xr-x 1,454 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

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

export LC_ALL=C.UTF-8

export PYBUILD_NAME=biom-format
export PYBUILD_DESTDIR_python3=debian/python3-$(PYBUILD_NAME)
export examplepkg=python-$(PYBUILD_NAME)-examples
export PYBUILD_AFTER_INSTALL_python3=dh_numpy3
export PYBUILD_BEFORE_TEST=cp -r {dir}/examples {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 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_installdocs-indep:
	dh_installdocs --indep
	dh_sphinxdoc --indep

override_dh_fixperms:
	dh_fixperms
	find debian -name exercise_cli.sh -exec chmod +x \{\} \;

override_dh_installexamples:
	dh_installexamples
	find debian -name "*.c" -delete
	find debian -name "*.pyx" -delete
	# move tests from Python3 package to examples package
	if [ ! -d biom/tests ] ; then \
	    mv `find debian/python*$(PYBUILD_NAME) -name tests -type d` biom ; \
	else \
	    find debian/python*$(PYBUILD_NAME) -name tests -type d | xargs rm -rf ; \
	fi

override_dh_auto_install:
	dh_auto_install
	find $(PYBUILD_DESTDIR_python3) -name .coverage -delete