1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
include /usr/share/openstack-pkg-tools/pkgos.make
%:
dh $@ --buildsystem=python_distutils --with python3,sphinxdoc,systemd
override_dh_auto_clean:
python3 setup.py clean
find . -iname '*.pyc' -delete
rm -rf doc/build
rm -f debian/panko-common.config debian/panko-common.postinst
rm -f debian/panko-api.config debian/panko-api.postinst
rm -f debian/*.init debian/*.upstart debian/*.service
rm -rf build
override_dh_auto_build:
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func panko-common.config
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func panko-common.postinst
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func panko-api.config
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func panko-api.postinst
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_postrm panko-common.postrm
pkgos-merge-templates panko-api panko endpoint
pkgos-merge-templates panko-common panko db rabbit ksat
override_dh_auto_install:
echo "Do nothing..."
override_dh_auto_test:
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 'panko\.tests\.unit\.*'
endif
mkdir -p $(CURDIR)/debian/panko-common/usr/share/panko-common
PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages python3-oslo-config-generator \
--output-file $(CURDIR)/debian/panko-common/usr/share/panko-common/panko.conf \
--namespace panko \
--namespace oslo.db \
--namespace oslo.log \
--namespace oslo.middleware.cors \
--namespace oslo.middleware.http_proxy_to_wsgi \
--namespace oslo.policy \
--namespace keystonemiddleware.auth_token
pkgos-readd-keystone-authtoken-missing-options $(CURDIR)/debian/panko-common/usr/share/panko-common/panko.conf keystone_authtoken panko
PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages python3-oslopolicy-sample-generator \
--output-file $(CURDIR)/debian/panko-common/usr/share/panko-common/policy.json \
--format json \
--namespace panko
pkgos-fix-config-default $(CURDIR)/debian/panko-common/etc/panko/panko.conf database backend sqlalchemy
pkgos-fix-config-default $(CURDIR)/debian/panko-common/etc/panko/panko.conf database connection sqlite:////var/lib/panko/sqlite.db
pkgos-fix-config-default $(CURDIR)/debian/panko-common/usr/share/panko-common/panko.conf oslo_concurrency lock_path /var/lock/panko
dh_install
dh_missing --fail-missing
override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
python3 -m sphinx $(SPHINXOPTS) -b html doc/source $(CURDIR)/debian/panko-doc/usr/share/doc/panko-doc/html
touch $(CURDIR)/debian/panko-doc/usr/share/doc/panko-doc/html/_static/toggle.js
dh_sphinxdoc
endif
override_dh_installman:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
python3 -m sphinx $(SPHINXOPTS) -b man doc/source doc/build/man
dh_installman
endif
override_dh_python3:
dh_python3 --shebang=/usr/bin/python3
|