File: rules

package info (click to toggle)
cloud-init 25.1.4-1%2Bdeb13u1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 12,100 kB
  • sloc: python: 134,496; sh: 3,879; makefile: 128; javascript: 30; xml: 22
file content (26 lines) | stat: -rwxr-xr-x 1,024 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
#!/usr/bin/make -f

PYTHON3S:=$(shell py3versions -vr)
export PYBUILD_INSTALL_ARGS=--init-system=systemd,sysvinit_deb

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

override_dh_auto_test:
	set -e && set -x && for pyvers in $(PYTHON3S); do \
		PYMAJOR=`echo $$pyvers | cut -d'.' -f1` ; \
		echo "===> Testing with python$$pyvers (python$$PYMAJOR)" ; \
		PYTHON=python$$pyvers PYTHONPATH=. python$$pyvers -m pytest -v tests/unittests --ignore-glob $(CURDIR)/tests/unittests/test_datasource/test_opennebula.py ; \
	done

override_dh_installinit:
	dh_installinit --onlyscripts --no-start --no-stop-on-upgrade --name cloud-init-main
	dh_installinit --onlyscripts --no-start --no-stop-on-upgrade --name cloud-init-local
	dh_installinit --onlyscripts --no-start --no-stop-on-upgrade --name cloud-config
	dh_installinit --onlyscripts --no-start --no-stop-on-upgrade --name cloud-final

override_dh_installsystemd:
	dh_installsystemd --no-restart-on-upgrade --no-start

override_dh_auto_clean:
	rm -rf .pybuild .pytest_cache build