#!/usr/bin/make -f include /usr/share/openstack-pkg-tools/pkgos.make %: dh $@ --buildsystem=python_distutils --with python3,sphinxdoc override_dh_auto_clean: find . -iname '*.pyc' -delete rm -f debian/cyborg-common.config debian/cyborg-common.postinst rm -f debian/cyborg-api.config debian/cyborg-api.postinst debian/cyborg-common.postrm rm -f debian/*.init debian/*.service debian/*.templates rm -rf build *.egg-info $(CURDIR)/debian/po 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 cyborg-common.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func cyborg-common.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func cyborg-api.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func cyborg-api.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_postrm cyborg-common.postrm pkgos-merge-templates cyborg-api cyborg endpoint pkgos-merge-templates cyborg-common cyborg db rabbit ksat override_dh_auto_install: echo "Do nothing..." override_dh_auto_test: echo "Do nothing..." override_dh_install: for i in $(PYTHON3S) ; do \ python$$i setup.py install --install-layout=deb --root $(CURDIR)/debian/tmp ; \ done ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) pkgos-dh_auto_test --no-py2 'cyborg\.tests\.unit.*' endif mkdir -p $(CURDIR)/debian/cyborg-common/usr/share/cyborg-common PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/cyborg-common/usr/share/cyborg-common/cyborg.conf \ --namespace cyborg \ --namespace oslo.db \ --namespace oslo.messaging \ --namespace oslo.policy \ --namespace oslo.log \ --namespace oslo.service.service \ --namespace oslo.service.periodic_task \ --namespace oslo.service.sslutils \ --namespace keystonemiddleware.auth_token pkgos-readd-keystone-authtoken-missing-options $(CURDIR)/debian/cyborg-common/usr/share/cyborg-common/cyborg.conf keystone_authtoken cyborg mkdir -p $(CURDIR)/debian/cyborg-common/etc/cyborg/policy.d PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslopolicy-sample-generator \ --output-file $(CURDIR)/debian/cyborg-common/etc/cyborg/policy.d/00_default_policy.yaml \ --format yaml \ --namespace cyborg.api mkdir -p $(CURDIR)/debian/cyborg-common/usr/share/cyborg-common cp $(CURDIR)/debian/tmp/usr/etc/cyborg/api-paste.ini $(CURDIR)/debian/cyborg-common/usr/share/cyborg-common rm -rf $(CURDIR)/debian/tmp/usr/etc dh_install dh_missing --fail-missing # Generate all config files override_dh_sphinxdoc: ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) # Warning: building doc fails. set -e ; set -x ; if ! PYTHON=python3 python3 -m sphinx $(SPHINXOPTS) -b html doc/source $(CURDIR)/debian/cyborg-doc/usr/share/doc/cyborg-doc/html ; then \ cat /tmp/sphinx-err*.log ; \ exit 1 ; \ fi dh_sphinxdoc endif override_dh_installman: ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) echo "No man pages for now" # sphinx-build $(SPHINXOPTS) -b man doc/source doc/build/man # dh_installman -O--buildsystem=python_distutils endif override_dh_python3: dh_python3 --shebang=/usr/bin/python3