Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 UPSTREAM_GIT = https://github.com/openstack/python-watcherclient.git
4 include /usr/share/openstack-pkg-tools/pkgos.make
5
6 %:
7 dh $@ --buildsystem=pybuild --with python3,sphinxdoc
8
9 export PATH := $(CURDIR)/debian/tmp/usr/bin:$(PATH)
10
11 override_dh_auto_clean:
12 rm -f AUTHORS ChangeLog
13 rm -rf build .stestr *.egg-info doc/source/reference/api .pybuild
14 find . -iname '*.pyc' -delete
15 for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done
16
17 override_dh_auto_build:
18 echo "Do nothing..."
19
20 override_dh_auto_install:
21 for i in $(PYTHON3S) ; do \
22 python3 setup.py install -f --install-layout=deb --root=$(CURDIR)/debian/tmp ; \
23 done
24 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
25 PYTHONPATH=$(CURDIR)/debian/python3-watcherclient/usr/lib/python3/dist-packages pkgos-dh_auto_test --no-py2 --test-path=./watcherclient/tests/unit
26 endif
27 install -D -m 0644 tools/watcher.bash_completion $(CURDIR)/debian/python3-watcherclient/usr/share/bash-completion/completions/watcher
28
29 override_dh_auto_test:
30 echo "Do nothing..."
31
32 override_dh_sphinxdoc:
33 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
34 python3 -m sphinx -b html doc/source $(CURDIR)/debian/python-watcherclient-doc/usr/share/doc/python-watcherclient-doc/html
35 dh_sphinxdoc -O--buildsystem=pybuild
36 endif
37
38 override_dh_python3:
39 dh_python3 --shebang=/usr/bin/python3