~nskaggs/autopilot/add-isolation-apparmor-rules

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: CI bot
  • Author(s): Tarmac
  • Date: 2014-05-09 00:48:06 UTC
  • mfrom: (483.2.19 temp-dev)
  • Revision ID: ps-jenkins@lists.canonical.com-20140509004806-8528si3da584w57j
Initial release of 1.5. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
# export DH_VERBOSE=1
6
6
 
7
7
%:
8
 
        dh $@ --with python2,python3
 
8
        dh $@ --with python3,sphinxdoc --buildsystem=pybuild
9
9
 
10
 
override_dh_auto_clean:
11
 
        set -ex; for python in $(shell py3versions -r); do \
12
 
            $$python setup.py clean || true; \
13
 
        done
14
 
        dh_auto_clean
15
 
        rm -rf build
 
10
override_dh_sphinxdoc:
 
11
        # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745690
 
12
        -dh_sphinxdoc
16
13
 
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; \
21
 
        done
22
15
        dh_auto_build
 
16
        sphinx-build -b html docs build/sphinx/html
 
17
        sphinx-build -b man docs build/sphinx/man
23
18
 
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
28
23
endif
29
 
 
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; \
33
 
        done
34
 
        dh_auto_install
35
 
 
36
 
override_dh_install:
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; \
45
 
        fi