File: rules

package info (click to toggle)
pywayland 0.4.18-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 676 kB
  • sloc: python: 3,625; xml: 189; makefile: 174
file content (44 lines) | stat: -rwxr-xr-x 1,279 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
#!/usr/bin/make -f

#export DH_VERBOSE = 1

include /usr/share/dpkg/architecture.mk
export PYBUILD_NAME=pywayland
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

%:

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

override_dh_auto_build:
	dh_auto_build
	# Force the build of CFFI bindings
	python3 setup.py build_ext --inplace
	cd doc; $(MAKE) man text
	#use always same id to make the package reproducible
	sed -i "s/id='[0-9]*'/id='140737181137280'/" doc/_build/text/module/server.txt
	sed -i "s/aq[0-9]\{9,\}/aq140737181137280/" doc/_build/man/pywayland.1

override_dh_auto_clean:
	find pywayland/protocol/ -mindepth 1 -type d -exec rm -rf {} +
	rm -rf pywayland/_ffi.*
	rm -rf doc/_build
	rm -rf doc/module/protocol
	rm -rf *.egg-info
	dh_auto_clean

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
		export PYTHONPATH=$(pwd)
		PYTHONPATH=$(pwd) pytest test/test_client_destroy.py
endif

override_dh_install:
	dh_install
	PYTHONPATH=$(pwd) pytest -k 'not test_server_eventloop and not test_event_queue and not test_get_registry and not test_server_display and not test_utils' test/

override_dh_installman:
	mv doc/_build/man/pywayland.1  doc/_build/man/pywayland-scanner.1
	dh_installman