#!/usr/bin/make -f include /usr/share/openstack-pkg-tools/pkgos.make export TZ=UTC %: dh $@ --buildsystem=python_distutils --with python3,sphinxdoc override_dh_auto_clean: python3 setup.py clean rm -f debian/watcher-common.config debian/watcher-common.postinst debian/watcher-api.config debian/watcher-api.postinst rm -rf debian/*.upstart debian/*.service rm -rf debian/watcher-common.postrm debian/*.templates debian/po debian/*.init rm -rf build .stestr doc/source/_static/watcher.conf.sample *.egg-info find . -iname '*.pyc' -delete for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done override_dh_auto_build: /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func watcher-common.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func watcher-common.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func watcher-api.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func watcher-api.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_postrm watcher-common.postrm pkgos-merge-templates watcher-api watcher endpoint pkgos-merge-templates watcher-common watcher db rabbit ksat override_dh_auto_install: echo "Do nothing..." override_dh_install: pkgos-dh_auto_install --no-py2 --in-tmp ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) pkgos-dh_auto_test --no-py2 --serial 'watcher\.tests\.api\.(?!.*test_hooks\.TestContextHook\.test_context_hook_before_method.*|.*v1\.test_audits\.TestPost\.test_create_continuous_audit_with_wrong_interval.*)' pkgos-dh_auto_test --no-py2 --serial 'watcher\.tests\.applier.*' pkgos-dh_auto_test --no-py2 --serial 'watcher\.tests\.cmd.*' pkgos-dh_auto_test --no-py2 --serial 'watcher\.tests\.common\.(?!.*test_clients\.TestClients\.test_clients_ironic.*|.*metal_helper\.test_maas.*)' pkgos-dh_auto_test --no-py2 --serial 'watcher\.tests\.conf.*' pkgos-dh_auto_test --no-py2 --serial 'watcher\.tests\.db.*' pkgos-dh_auto_test --no-py2 --serial 'watcher\.tests\.decision_engine.*' pkgos-dh_auto_test --no-py2 --serial 'watcher\.tests\.notifications.*' pkgos-dh_auto_test --no-py2 --serial 'watcher\.tests\.objects.*' endif rm -rf $(CURDIR)/debian/python3-watcher/usr/etc mkdir -p $(CURDIR)/debian/watcher-common/usr/share/watcher-common PYTHONPATH=$(CURDIR)/debian/python3-watcher/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/watcher-common/usr/share/watcher-common/watcher.conf \ --wrap-width 140 \ --namespace watcher \ --namespace keystonemiddleware.auth_token \ --namespace oslo.cache \ --namespace oslo.concurrency \ --namespace oslo.db \ --namespace oslo.log \ --namespace oslo.messaging \ --namespace oslo.policy \ --namespace oslo.reports \ --namespace oslo.service.periodic_task \ --namespace oslo.service.service \ --namespace oslo.service.wsgi pkgos-readd-keystone-authtoken-missing-options $(CURDIR)/debian/watcher-common/usr/share/watcher-common/watcher.conf keystone_authtoken watcher PYTHONPATH=$(CURDIR)/debian/python3-watcher/usr/lib/python3/dist-packages oslopolicy-sample-generator \ --output-file $(CURDIR)/debian/watcher-common/usr/share/watcher-common/policy.json \ --format json \ --namespace watcher pkgos-fix-config-default $(CURDIR)/debian/watcher-common/usr/share/watcher-common/watcher.conf oslo_concurrency lock_path /var/lock/watcher dh_install dh_missing --fail-missing rm -rf debian/python3-watcher/usr/etc mkdir -p $(CURDIR)/debian/watcher-api/usr/bin cp watcher/api/app.wsgi $(CURDIR)/debian/watcher-api/usr/bin/watcher-wsgi-api # Disable https in default setup, as this makes our CI fail pkgos-fix-config-default $(CURDIR)/debian/watcher-common/usr/share/watcher-common/watcher.conf keystone_authtoken auth_protocol http # Fix the missing sql_connection directive pkgos-fix-config-default $(CURDIR)/debian/watcher-common/usr/share/watcher-common/watcher.conf database sqlite:////var/lib/watcher/watcherdb override_dh_auto_test: echo "Do nothing..." override_dh_sphinxdoc: ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) PYTHON=python3 PYTHONPATH=. python3 -m sphinx $(SPHINXOPTS) -b html doc/source $(CURDIR)/debian/watcher-doc/usr/share/doc/watcher-doc/html touch $(CURDIR)/debian/watcher-doc/usr/share/doc/watcher-doc/html/_static/toggle.js dh_sphinxdoc endif override_dh_python3: dh_python3 --shebang=/usr/bin/python3