File: rules

package info (click to toggle)
python-watchdog 1.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 744 kB
  • sloc: python: 4,922; ansic: 520; xml: 155; makefile: 130
file content (34 lines) | stat: -rwxr-xr-x 1,133 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
#!/usr/bin/make -f

export PYBUILD_NAME=watchdog

ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
%:
	dh $@ --with sphinxdoc --buildsystem=pybuild

override_dh_sphinxdoc:
	python3 -m sphinx -b man docs/source docs/build/man
	sed -i 's/.TH "WATCHDOG" "1"/.TH "WATCHDOG" "3"/g' docs/build/man/watchdog.1
	cp -f docs/build/man/watchdog.1 docs/build/man/watchdog3.1
	PYTHONPATH=. python3 -m sphinx -b html docs/source $(CURDIR)/debian/python-watchdog/usr/share/doc/python-watchdog/html
	PYTHONPATH=. python3 -m sphinx -b html docs/source $(CURDIR)/debian/python3-watchdog/usr/share/doc/python3-watchdog/html
	dh_sphinxdoc -O--buildsystem=pybuild

else
%:
	dh $@ --buildsystem=pybuild
endif

execute_after_dh_clean:
	rm -rf docs/build .pytest_cache .coverage .pybuild

ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
execute_before_dh_auto_test:
	mv tests/test_fsevents.py tests/skip_test_fsevents.py
	mv tests/test_observers_winapi.py tests/skip_test_observers_winapi.py

execute_after_dh_auto_test:
	mv tests/skip_test_fsevents.py tests/test_fsevents.py
	mv tests/skip_test_observers_winapi.py tests/test_observers_winapi.py

endif