~cjwatson/launchpad-buildd/snap-image-info

« back to all changes in this revision

Viewing changes to debian/rules

[r=wgrant] Normalise Python packaging.  We now install our modules on the normal
system path, using pybuild.  setup.py now installs buildd-slave.tac in
the lpbuildd package rather than data_files in order not to pollute the
top level of a virtualenv.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
#
3
 
# Copyright 2009-2015 Canonical Ltd.  
 
3
# Copyright 2009-2017 Canonical Ltd.  
4
4
5
5
# This software is licensed under the GNU Affero General Public License version
6
6
# 3 (see the file LICENSE).
7
7
 
 
8
export PYBUILD_NAME := lpbuildd
 
9
 
 
10
export LIBDIR := $(shell python -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())')
 
11
 
8
12
%:
9
 
        dh $@
 
13
        dh $@ --with=python2 --buildsystem=pybuild
10
14
 
11
15
override_dh_auto_build:
 
16
        dh_auto_build
12
17
        python buildd-genconfig --template=template-buildd-slave.conf \
13
18
        --arch=i386 --port=8221 --name=default --host=buildd.buildd \
14
19
                > buildd-slave-example.conf
15
20
 
16
 
override_dh_auto_test:
17
 
        dh_auto_test
18
 
        find -name \*.pyc -print0 | xargs -0r rm -f
19
 
 
20
 
override_dh_auto_clean:
21
 
        find -name \*.pyc -print0 | xargs -0r rm -f
 
21
override_dh_auto_install:
 
22
        dh_auto_install
 
23
        # This should be split into a testable library and a wrapper.
 
24
        chmod +x debian/python-lpbuildd/$(LIBDIR)/lpbuildd/check_implicit_pointer_functions.py
22
25
 
23
26
override_dh_builddeb:
24
27
        dh_builddeb -- -Zgzip