File: rules

package info (click to toggle)
python-guizero 1.6.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,872 kB
  • sloc: python: 7,160; makefile: 34; sh: 17
file content (46 lines) | stat: -rwxr-xr-x 1,258 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
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/make -f

export DH_ALWAYS_EXCLUDE=__pycache__

export DH_VERBOSE=1
export PYBUILD_VERBOSE=1

export LANG=C.UTF-8
export LC_ALL=C.UTF-8

export PYBUILD_NAME=guizero
export PYBUILD_BEFORE_TEST=cp -rv {dir}/tests {build_dir}; cp -v {dir}/examples/guizero* {build_dir}/tests
export PYBUILD_AFTER_TEST=rm -rfv {build_dir}/tests

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

override_dh_auto_clean:
	dh_auto_clean
	find -name __pycache__ | xargs rm -rfv

override_dh_auto_build:
	dh_auto_build
	mv $(CURDIR)/docs/index.md $(CURDIR)/index.off
	cp $(CURDIR)/docs/about.md $(CURDIR)/about.off
	mv $(CURDIR)/docs/about.md $(CURDIR)/docs/index.md
	mv $(CURDIR)/docs/mkdocs.yml $(CURDIR)/mkdocs.yml
	mkdocs build -d $(CURDIR)/html -f $(CURDIR)/mkdocs.yml
	mv $(CURDIR)/mkdocs.yml $(CURDIR)/docs/mkdocs.yml
	find $(CURDIR)/html -type f -name sitemap.xml.gz -delete
	mv $(CURDIR)/index.off $(CURDIR)/docs/index.md
	mv $(CURDIR)/about.off $(CURDIR)/docs/about.md

override_dh_auto_test:
	xvfb-run -a dh_auto_test

override_dh_compress:
	dh_compress -Xchangelog.html

override_dh_installchangelogs:
	dh_installchangelogs docs/changelog.md upstream
	dh_installchangelogs

override_dh_installdocs:
	dh_installdocs
	dh_mkdocs -T libjs-underscore -T mkdocs-nature