Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 include /usr/share/openstack-pkg-tools/pkgos.make
4
5 %:
6 dh $@ --buildsystem=pybuild --with python3
7
8 override_dh_clean:
9 dh_clean
10 rm -rf .coverage* *.egg-info
11 rm -rf build .pybuild
12
13 override_dh_auto_clean:
14 python3 setup.py clean
15
16 override_dh_auto_build:
17 echo "Do nothing..."
18
19 override_dh_auto_install:
20 echo "Do nothing..."
21
22 override_dh_install:
23 for i in $(PYTHON3S) ; do \
24 python$$i setup.py install --install-layout=deb --root $(CURDIR)/debian/tmp ; \
25 done
26
27 # Copy config enabled to openstack-dashboard enabled location
28 mkdir -p $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/openstack_dashboard/local/enabled
29 cp $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/designatedashboard/enabled/_[0-9]*.py $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/openstack_dashboard/local/enabled
30
31 dh_install
32 dh_missing --fail-missing
33
34 override_dh_auto_test:
35 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
36 PYTHONPATH=$(CURDIR) \
37 PYTHON=python3 \
38 PYTHONDONTWRITEBYTECODE=1 \
39 DJANGO_SETTINGS_MODULE=designatedashboard.settings \
40 python3 $(CURDIR)/manage.py test designatedashboard -v 2 --settings=designatedashboard.tests.settings
41 ## Delete __pycache__
42 find . -name __pycache__ -prune -exec rm -rf {} +;
43 endif