| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export PYBUILD_NAME=django-mailman3 |
| 4 |
|
| 5 |
%: |
| 6 |
dh $@ --with python3 --buildsystem=pybuild |
| 7 |
|
| 8 |
override_dh_auto_test: |
| 9 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 10 |
set -e; \ |
| 11 |
for python3 in $(shell py3versions -r); do \ |
| 12 |
$$python3 $(shell which django-admin) test --pythonpath=. --settings=django_mailman3.tests.settings_test django_mailman3; \ |
| 13 |
done |
| 14 |
endif |
| 15 |
|
| 16 |
override_dh_python3: |
| 17 |
dh_python3 |
| 18 |
# Due to bug #908999, dh_python3 removes the empty directory |
| 19 |
# 'usr/share/python3-django-postorius', so run mkdir manually. |
| 20 |
mkdir -p debian/python3-django-mailman3/usr/share/python3-django-mailman3 |
| 21 |
# Move static files outside of the lib directory |
| 22 |
mv debian/python3-django-mailman3/usr/lib/python3/dist-packages/django_mailman3/static \ |
| 23 |
debian/python3-django-mailman3/usr/share/python3-django-mailman3/ |
| 24 |
dh_link usr/share/python3-django-mailman3/static \ |
| 25 |
usr/lib/python3/dist-packages/django_mailman3/static |
| 26 |
# Compile django lc messages |
| 27 |
cd debian/python3-django-mailman3/usr/lib/python3/dist-packages/django_mailman3/ && django-admin compilemessages |