Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 include /usr/share/openstack-pkg-tools/pkgos.make
4
5 %:
6 dh $@ --with python3
7
8 override_dh_auto_clean:
9 python3 setup.py clean
10 rm -f debian/*.init debian/*.service debian/*.upstart debian/mistral-common.postinst debian/mistral-common.config
11 rm -rf debian/mistral-common.postrm debian/*.templates debian/po debian/mistral-api.config debian/mistral-api.postinst
12 rm -rf build .stestr *.egg-info .pybuild mistral.log
13 find . -iname '*.pyc' -delete
14 for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done
15
16 override_dh_auto_build:
17 /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func mistral-common.postinst
18 /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func mistral-common.config
19 /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func mistral-api.config
20 /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func mistral-api.postinst
21 /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_postrm mistral-common.postrm
22 pkgos-merge-templates mistral-api mistral endpoint
23 pkgos-merge-templates mistral-common mistral db rabbit ksat
24
25 override_dh_auto_install:
26 echo "Do nothing..."
27
28 override_dh_auto_test:
29 echo "Do nothing..."
30
31 override_dh_install:
32 set -e ; for pyvers in $(PYTHON3S); do \
33 python$$pyvers setup.py install --install-layout=deb --root $(CURDIR)/debian/tmp; \
34 done
35
36 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
37 pkgos-dh_auto_test --no-py2 --serial 'mistral\.tests\.unit\.(?!(actions\.openstack\.test_generator\.GeneratorTest\.test_generator.*|api\.v2\.test_action_executions\.TestActionExecutionsController\.test_get_all_with_and_without_output.*|actions\.test_std_mistral_http_action\.MistralHTTPActionTest\.test_http_action.*|actions\.test_std_http_action\.HTTPActionTest\.test_http_action.*|engine\.test_action_heartbeat_checker\.ActionHeartbeatCheckerTest\.test_fail_action_with_missing_heartbeats_wf_spec_not_cached.*|engine\.test_dataflow\.DataFlowTest\.test_context_view_eval_keys.*|engine\.test_action_heartbeat_sender\.ActionHeartbeatSenderRemoteExecutorTest\.test_long_action_failure_with_disabled_sender.*|engine\.test_action_heartbeat_sender\.ActionHeartbeatSenderLocalExecutorTest\.test_long_action_failure_with_disabled_sender|scheduler\.test_default_scheduler\.DefaultSchedulerTest.*|services\.test_event_engine\.EventEngineTest\.test_process_event_queue.*|services\.test_event_engine\.EventEngineTest\.test_event_engine_public_trigger.*|engine\.test_action_heartbeat_checker\.ActionHeartbeatCheckerTest\.test_fail_action_with_missing_heartbeats.*))'
38 endif
39
40
41 # Copy the configuration files
42 set -e ; for i in logging.conf wf_trace_logging.conf ; do \
43 install -D -m 0664 etc/$$i.sample $(CURDIR)/debian/mistral-common/usr/share/mistral-common/$$i ; \
44 done
45 install -D -m 0664 etc/policy.json $(CURDIR)/debian/mistral-common/usr/share/mistral-common/policy.json ; \
46 PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \
47 --namespace mistral.config \
48 --namespace cotyledon \
49 --namespace oslo.concurrency \
50 --namespace oslo.db \
51 --namespace oslo.messaging \
52 --namespace oslo.middleware.cors \
53 --namespace oslo.middleware.healthcheck \
54 --namespace oslo.middleware.http_proxy_to_wsgi \
55 --namespace keystonemiddleware.auth_token \
56 --namespace oslo.log \
57 --namespace oslo.policy \
58 --namespace oslo.service.sslutils \
59 --output-file $(CURDIR)/debian/mistral-common/usr/share/mistral-common/mistral.conf
60 pkgos-readd-keystone-authtoken-missing-options $(CURDIR)/debian/mistral-common/usr/share/mistral-common/mistral.conf keystone_authtoken mistral
61
62 PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslopolicy-sample-generator \
63 --output-file $(CURDIR)/debian/mistral-common/usr/share/mistral-common/policy.json \
64 --namespace mistral
65
66 pkgos-fix-config-default $(CURDIR)/debian/mistral-common/usr/share/mistral-common/mistral.conf keystone_authtoken auth_protocol http
67
68 # Without the lock_path, mistral is broken.
69 pkgos-fix-config-default $(CURDIR)/debian/mistral-common/usr/share/mistral-common/mistral.conf oslo_concurrency lock_path /var/lock/mistral
70
71 dh_install
72 dh_missing --fail-missing
73
74 override_dh_python3:
75 dh_python3 --shebang=/usr/bin/python3