| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
include /usr/share/openstack-pkg-tools/pkgos.make |
| 4 |
|
| 5 |
%: |
| 6 |
dh $@ --buildsystem=pybuild --with python3 |
| 7 |
|
| 8 |
override_dh_clean: |
| 9 |
dh_clean |
| 10 |
rm -rf .coverage |
| 11 |
rm -rf build *.egg-info .pybuild |
| 12 |
|
| 13 |
override_dh_auto_clean: |
| 14 |
python3 setup.py clean |
| 15 |
|
| 16 |
override_dh_auto_build: |
| 17 |
echo "Do nothing..." |
| 18 |
|
| 19 |
override_dh_auto_install: |
| 20 |
echo "Do nothing..." |
| 21 |
|
| 22 |
override_dh_install: |
| 23 |
for i in $(PYTHON3S) ; do \ |
| 24 |
python$$i setup.py install --install-layout=deb --root $(CURDIR)/debian/tmp ; \ |
| 25 |
done |
| 26 |
|
| 27 |
# Copy config enabled to openstack-dashboard enabled location |
| 28 |
mkdir -p $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/openstack_dashboard/local/enabled |
| 29 |
cp $(CURDIR)/ironic_ui/enabled/_[0-9]*.py $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/openstack_dashboard/local/enabled |
| 30 |
|
| 31 |
dh_install |
| 32 |
dh_missing --fail-missing |
| 33 |
|
| 34 |
override_dh_auto_test: |
| 35 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 36 |
for i in $(PYTHON3S) ; do \ |
| 37 |
PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages \ |
| 38 |
python$$i $(CURDIR)/manage.py test ironic_ui.test.tests -v 2 --settings=ironic_ui.test.settings ; \ |
| 39 |
done |
| 40 |
## Delete __pycache__ |
| 41 |
find . -name __pycache__ -prune -exec rm -rf {} +; |
| 42 |
endif |