File: rules

package info (click to toggle)
python-can 4.6.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,428 kB
  • sloc: python: 27,154; makefile: 32; sh: 16
file content (44 lines) | stat: -rwxr-xr-x 1,114 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
44
#! /usr/bin/make -f

export PYTHONWARNINGS=d
export PYBUILD_NAME=can

export PYTEST_ADDOPTS=--ignore=test/test_interface_canalystii.py \
	-k 'not BasicTestUdpMulticastBusIP' \
	--tb=short \
	--reruns 3 --reruns-delay 2

include /usr/share/dpkg/default.mk
export DEB_VERSION_UPSTREAM

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_clean:
	rm -f test.asc test.csv
	rm -rf .pytest_cache/

execute_after_dh_auto_build:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
	PYTHONPATH=$(CURDIR) python3 -m sphinx \
		   -E -T -b html \
		   doc $(CURDIR)/.pybuild/docs/html/
endif

execute_after_dh_auto_install:
	-for f in debian/*/usr/bin/*.py; do mv $$f $${f%.py}; done
	-find debian/python3-can -name test.trc -delete

override_dh_installdocs:
	dh_installdocs --doc-main-package=python3-can -p python-can-doc
	dh_installdocs --remaining-packages

manpages=debian/can_logger.1 debian/can_player.1 debian/can_viewer.1 debian/can_logconvert.1 debian/can_bridge.1

$(manpages): debian/helper2man
	cp $^ $(@:.1=)
	help2man -N -o $@ ./$(@:.1=)
	-rm $(@:.1=)

.PHONY: manpages
manpages: $(manpages)