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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
#!/usr/bin/make -f
include /usr/share/dpkg/default.mk
VERSIONS := $(shell py3versions --supported -v)
TESTSUITE_FAIL_CMD=exit 1
NON_FATAL=( echo "*** test-suite FAILED but continuing anyway ***"; true; )
ifneq ($(filter $(DEB_BUILD_ARCH), ),)
# tests currently fail on these architectures
TESTSUITE_FAIL_CMD=$(NON_FATAL)
endif
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@
override_dh_auto_configure-arch:
set -e; for v in $(VERSIONS); do \
dh_auto_configure \
--builddirectory=build-$$v \
-- \
-Dpython=/usr/bin/python$$v \
-Dauto_features=enabled \
; \
done
override_dh_auto_build-arch:
set -e; for v in $(VERSIONS); do \
PYTHON=/usr/bin/python$$v \
dh_auto_build \
--arch \
--builddirectory=build-$$v \
-- \
; \
done
# don't run the tests under fakeroot, otherwise they will try to connect to
# root's session D-BUS
override_dh_auto_test-arch:
ifeq ($(DEB_HOST_ARCH_OS), linux)
set -e; for v in $(VERSIONS); do \
LC_ALL=C.UTF-8; \
PYTHON=/usr/bin/python$$v; \
export HOME=$(CURDIR)/debian/tmp/home; \
mkdir -p $$HOME/.local/share; \
unset LD_PRELOAD; \
VERBOSE=1; \
xvfb-run dh_auto_test \
--arch \
--builddirectory=build-$$v \
-- \
--timeout-multiplier 3 \
|| $(TESTSUITE_FAIL_CMD) \
; \
while [ -e /tmp/.X99-lock ]; do \
echo "Waiting for xvfb to finish..."; \
sleep 0.5; \
done; \
done
endif
override_dh_auto_install-arch:
set -e; for v in $(VERSIONS); do \
PYTHON=/usr/bin/python$$v \
VERBOSE=1 \
dh_auto_install \
--arch \
--builddirectory=build-$$v \
--destdir=debian/tmp \
-- \
; \
done
override_dh_strip:
dh_strip --dbgsym-migration='python3-gi-dbg (<< 3.46.0-2~)'
|