File: rules

package info (click to toggle)
python-django-treebeard 4.3.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,160 kB
  • sloc: python: 5,010; makefile: 184
file content (36 lines) | stat: -rwxr-xr-x 1,154 bytes parent folder | download
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
#!/usr/bin/make -f

export PYBUILD_NAME=django-treebeard

%:
	dh $@ --with=python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_clean:
	rm -rf docs/.build
	dh_auto_clean

override_dh_auto_build:
	dh_auto_build
	set -e; \
	for loc in treebeard/locale/*; do \
		test -r $$loc/LC_MESSAGES/django.po &&\
			python3 setup.py compile_catalog --directory treebeard/locale/ --locale $$(basename $$loc) --domain django; \
		test -r $$loc/LC_MESSAGES/djangojs.po &&\
			python3 setup.py compile_catalog --directory treebeard/locale/ --locale $$(basename $$loc) --domain djangojs; \
	done

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. python3 -m sphinx -b html -N docs/source/ $(CURDIR)/debian/python-django-treebeard-doc/usr/share/doc/python-django-treebeard-doc/html
	dh_sphinxdoc
endif

override_dh_auto_install:
	dh_auto_install
	set -e; \
	for inst in debian/python3-django-treebeard/usr/lib/python3*/dist-packages/treebeard/static/treebeard; do \
		ln -s ../../../../../../share/javascript/jquery-ui/jquery-ui.min.js $$inst/jquery-ui.min.js; \
	done

override_dh_compress:
	dh_compress -X.js -X.py -Xobjects.inv