Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2
3 export HOME="$(CURDIR)/debian/test"
4 include /usr/share/openstack-pkg-tools/pkgos.make
5
6 %:
7 dh $@ --with python3,sphinxdoc
8
9 override_dh_clean:
10 dh_clean
11 rm -rf .testrepository
12 rm -f debian/aodh-common.config debian/aodh-common.postinst debian/aodh-api.config debian/aodh-api.postinst debian/aodh-common.postrm
13 rm -f debian/*.init debian/*.service debian/*.upstart
14 rm -rf debian/po debian/*.templates *.egg-info
15 rm -f doc/source/_static/aodh.conf.sample doc/source/_static/aodh.policy.yaml.sample
16 rm -rf $(CURDIR)/\"
17 find . -iname '*.pyc' -delete
18 for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done
19
20 override_dh_auto_clean:
21 python3 setup.py clean -a
22
23 override_dh_auto_build:
24 /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func aodh-common.config
25 /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func aodh-common.postinst
26 /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func aodh-api.config
27 /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func aodh-api.postinst
28 /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_postrm aodh-common.postrm
29 pkgos-merge-templates aodh-api aodh endpoint
30 pkgos-merge-templates aodh-common aodh db rabbit ksat
31
32 override_dh_auto_install:
33 echo "Do nothing here..."
34
35 override_dh_auto_test:
36 echo "Do nothing here..."
37
38 override_dh_install:
39 for i in $(PYTHON3S) ; do \
40 python$$i setup.py install --force --no-compile -O0 --install-layout=deb --root $(CURDIR)/debian/tmp ; \
41 done
42 rm -rf $(CURDIR)/debian/tmp/usr/etc
43
44 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
45 pkgos-dh_auto_test --no-py2 'aodh\.tests\.unit\.(?!(.*test_bin.*|.*test_messaging\.MessagingTests\.test_get_transport_optional.*|.*evaluator\.test_base\.TestEvaluatorBaseClass\.test_base_time_constraints_timezone.*|test_notifier\.TestAlarmNotifier\.test_notify_alarm_rest_action_ok))'
46 endif
47
48 for i in api-paste.ini app.wsgi ; do \
49 cp aodh/api/$$i $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/aodh/api ; \
50 done
51
52 dh_install
53 dh_missing --fail-missing
54
55 # Manage policy.yaml
56 mkdir -p $(CURDIR)/debian/aodh-common/etc/aodh/policy.d
57 PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages:$(CURDIR) oslopolicy-sample-generator \
58 --output-file $(CURDIR)/debian/aodh-common/etc/aodh/policy.d/00_default_policy.yaml \
59 --namespace aodh
60
61 # Comment out deprecated policies, otherwise, Nova doesn't work
62 sed -i 's/^"/#"/' $(CURDIR)/debian/aodh-common/etc/aodh/policy.d/00_default_policy.yaml
63
64 # Manage aodh.conf
65 PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \
66 --output-file $(CURDIR)/debian/aodh-common/usr/share/aodh-common/aodh.conf \
67 --namespace aodh \
68 --namespace aodh-auth \
69 --namespace cotyledon \
70 --namespace oslo.db \
71 --namespace oslo.log \
72 --namespace oslo.messaging \
73 --namespace oslo.middleware.cors \
74 --namespace oslo.middleware.healthcheck \
75 --namespace oslo.middleware.http_proxy_to_wsgi \
76 --namespace oslo.policy \
77 --namespace oslo.reports \
78 --namespace keystonemiddleware.auth_token
79
80 pkgos-readd-keystone-authtoken-missing-options $(CURDIR)/debian/aodh-common/usr/share/aodh-common/aodh.conf keystone_authtoken aodh
81
82 # Use the policy.d folder
83 pkgos-fix-config-default $(CURDIR)/debian/aodh-common/usr/share/aodh-common/aodh.conf oslo_policy policy_dirs /etc/aodh/policy.d
84
85 pkgos-fix-config-default $(CURDIR)/debian/aodh-common/usr/share/aodh-common/aodh.conf api paste_config /usr/lib/python3/dist-packages/aodh/api/api-paste.ini
86
87 # Add sqlalchemy migration which are missing
88 mkdir -p $(CURDIR)/debian/python3-aodh/usr/lib/python3/dist-packages/aodh/storage/sqlalchemy
89 cp -auxf $(CURDIR)/aodh/storage/sqlalchemy/* $(CURDIR)/debian/python3-aodh/usr/lib/python3/dist-packages/aodh/storage/sqlalchemy
90
91 override_dh_sphinxdoc:
92 ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
93 PYTHONPATH=. PYTHON=python3 python3 -m sphinx -b html doc/source $(CURDIR)/debian/aodh-doc/usr/share/doc/aodh-doc/html
94 mkdir -p $(CURDIR)/debian/aodh-doc/usr/share/doc/aodh-doc/html/_static
95 touch $(CURDIR)/debian/aodh-doc/usr/share/doc/aodh-doc/html/_static/toggle.js
96 dh_sphinxdoc
97 endif
98
99 override_dh_python3:
100 dh_python3 --shebang=/usr/bin/python3
101