File: rules

package info (click to toggle)
ytcc 2.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 436 kB
  • sloc: python: 2,290; sh: 129; makefile: 19
file content (26 lines) | stat: -rwxr-xr-x 878 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
#!/usr/bin/make -f

export DH_VERBOSE=1
export DH_ALWAYS_EXCLUDE=__pycache__
export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/ytcc --install-scripts=/usr/share/ytcc

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

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# exclude internet tests
	# pytest --deselect does pattern matching so *all* test_subscribe* are deselected...
	sed -i -e '/test_subscribe(/i @pytest.mark.skip()' \
	       -e '/test_import(/i @pytest.mark.skip()' \
	       -e '/test_import_duplicate(/i @pytest.mark.skip()' \
	       -e '/test_update(/i @pytest.mark.skip()' \
	       -e '/test_download(/i @pytest.mark.skip()' \
	       -e '/test_play_video(/i @pytest.mark.skip()' \
	       $(CURDIR)/test/test_cli.py
	dh_auto_test
endif

override_dh_auto_clean:
	sed -i '/@pytest.mark.skip/d' $(CURDIR)/test/test_cli.py
	dh_auto_clean