File: rules

package info (click to toggle)
python-mbed-ls 1.6.2%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 576 kB
  • sloc: python: 2,784; makefile: 32; sh: 14
file content (46 lines) | stat: -rwxr-xr-x 1,070 bytes parent folder | download | duplicates (4)
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

include /usr/share/dpkg/pkg-info.mk

export DH_VERBOSE = 1
export PYBUILD_VERBOSE=1

export LANG=C.UTF-8
export LC_ALL=C.UTF-8

export PYBUILD_NAME=mbed_ls

export PYBUILD_BEFORE_TEST=cp -rv {dir}/test {build_dir}
export PYBUILD_AFTER_TEST=rm -rfv {build_dir}/test

mbedls_tests = $(wildcard test/*.py)

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

override_dh_auto_clean:
	dh_auto_clean
	rm -rf html/

override_dh_auto_build:
	dh_auto_build
	# build custom manpage
	@echo DEB_VERSION_UPSTREAM $(DEB_VERSION_UPSTREAM)
	sed -e "s/__VERSION__/$(DEB_VERSION_UPSTREAM)/g" \
			< debian/mbedls.1.md.in > debian/mbedls.1.md
	pandoc debian/mbedls.1.md -s -f markdown -t man -o debian/mbedls.1
	# build library documentation
	doxygen doxygen.cfg
	$(RM) html/jquery.js

override_dh_installdocs:
	dh_installdocs
	dh_doxygen

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	python3 setup.py egg_info
	PYBUILD_SYSTEM=custom \
	PYBUILD_TEST_ARGS="{interpreter} -m unittest discover -v -s test -p \"*.py\" -t {dir}" \
	dh_auto_test
endif