File: rules

package info (click to toggle)
pyatspi 2.46.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,480 kB
  • sloc: sh: 4,639; ansic: 3,644; python: 3,191; xml: 408; makefile: 195
file content (50 lines) | stat: -rwxr-xr-x 1,529 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
45
46
47
48
49
50
#!/usr/bin/make -f

# Taken from the pygobject packaging.
PYVERS := $(shell py3versions --supported --version)

configure_flags =

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
        configure_flags += --enable-tests
endif

%:
	dh $@

override_dh_auto_configure:
	set -e ; for pyver in $(PYVERS); do \
	    PYTHON=/usr/bin/python$$pyver dh_auto_configure -B $(CURDIR)/build-$$pyver -- $(configure_flags); \
	done

override_dh_auto_build:
	set -e ; for pyver in $(PYVERS); do \
	    PYTHON=/usr/bin/python$$pyver dh_auto_build -B $(CURDIR)/build-$$pyver; \
	done

override_dh_auto_test:
	chmod +x tests/pyatspi/runtests.sh
	chmod +x tests/pyatspi/testrunner.in
	fail=0; \
	set -e ; for pyver in $(PYVERS); do \
	    echo "====================  test with PYTHON $$pyver =================="; \
	    if PYTHON=/usr/bin/python$$pyver xvfb-run -s -noreset -a dbus-run-session -- $(MAKE) -C $(CURDIR)/build-$$pyver check; \
	    then \
	      echo "====================  test with PYTHON $$pyver DONE =================="; \
            else \
	      echo "====================  test with PYTHON $$pyver FAILED =================="; \
              cat $(CURDIR)/build-$$pyver/tests/pyatspi/test-suite.log; \
	      fail=1; \
	    fi; \
	done; exit $$fail

override_dh_auto_install:
	set -e ; for pyver in $(PYVERS); do \
	    PYTHON=/usr/bin/python$$pyver dh_auto_install -B $(CURDIR)/build-$$pyver; \
	done

override_dh_auto_clean:
	-for pyver in $(PYVERS); do \
	    dh_auto_clean -B $(CURDIR)/build-$$pyver; \
	done
	dh_auto_clean