5
5
# export DH_VERBOSE=1
8
dh $@ --with python2,python3
8
dh $@ --with python3,sphinxdoc --buildsystem=pybuild
10
override_dh_auto_clean:
11
set -ex; for python in $(shell py3versions -r); do \
12
$$python setup.py clean || true; \
10
override_dh_sphinxdoc:
11
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745690
17
14
override_dh_auto_build:
18
sphinx-build -b html -W docs/ docs/_build/html/
19
set -ex; for python in $(shell py3versions -r); do \
20
$$python setup.py build; \
16
sphinx-build -b html docs build/sphinx/html
17
sphinx-build -b man docs build/sphinx/man
24
19
override_dh_auto_test:
25
20
ifeq (, $(findstring nocheck, $(DEB_BUILD_OPTIONS)))
26
python -m testtools.run discover autopilot.tests.unit
21
HOME=`mktemp -d --tmpdir=debian` \
27
22
python3 -m testtools.run discover autopilot.tests.unit
30
override_dh_auto_install:
31
set -ex; for python in $(shell py3versions -r); do \
32
$$python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
37
dh_install -X.pyc --fail-missing
38
# provide python3-ized runner and avoid file conflicts
39
set -e; if [ -d debian/python3-autopilot ]; then \
40
cd debian/python3-autopilot; \
41
mv usr/bin/autopilot usr/bin/autopilot3; \
42
ln -s autopilot3 usr/bin/autopilot-py3; \
43
sed -i '1 s/python$$/python3/' usr/bin/autopilot3; \
44
mv lib/udev/rules.d/61-autopilot-uinput.rules lib/udev/rules.d/61-autopilot-py3-uinput.rules; \