File: rules

package info (click to toggle)
intake 0.6.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,552 kB
  • sloc: python: 12,408; makefile: 37; sh: 14
file content (43 lines) | stat: -rwxr-xr-x 1,476 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
#!/usr/bin/make -f

# DH_VERBOSE := 1
export LC_ALL=C.UTF-8

include /usr/share/dpkg/default.mk

export PYBUILD_NAME=intake

# for hardening you might like to uncomment this:
# export DEB_BUILD_MAINT_OPTIONS=hardening=+all

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

override_dh_auto_build: export http_proxy=127.0.0.1:9
override_dh_auto_build: export https_proxy=127.0.0.1:9
override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. python3 -m sphinx -N -bhtml docs/source/ build/html/ # HTML generator
	PYTHONPATH=. python3 -m sphinx -N -bman docs/source/ build/man/ # Manpage generator

override_dh_install:
	dh_install

	# For some reason, not all data is movable via install or dh_install, so
	# just force copy (and overwrite if needed) for pytest to actually work
	set -e \
	; for py in `py3versions -sv` \
	; do builddir=".pybuild/cpython3_$${py}_$(PYBUILD_NAME)/build" \
	;    cp -a intake/source/tests $${builddir}/intake/source \
	;    cp -a intake/catalog/tests $${builddir}/intake/catalog \
	;    cp -a intake/interface/tests $${builddir}/intake/interface \
	; done

	PYBUILD_SYSTEM=custom \
		       PYBUILD_TEST_ARGS='cd {build_dir}; PATH=$(CURDIR)/debian/{package}/usr/bin:$(CURDIR)/debian/{package}/usr/lib:$(CURDIR)/debian/{package}/build/intake:$$PATH {interpreter} -m pytest' \
		       dh_auto_test --buildsystem=pybuild

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	echo "Build time test is done in dh_install."
endif