File: rules

package info (click to toggle)
plastex 2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 5,740 kB
  • sloc: python: 20,923; xml: 18,043; ansic: 46; makefile: 34; sh: 23
file content (31 lines) | stat: -rwxr-xr-x 958 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
#!/usr/bin/make -f

export PYBUILD_NAME = plastex

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

override_dh_auto_build:
	dh_auto_build
	export PYTHONPATH=..; \
	export TEXINPUTS=.:$(CURDIR)/Doc/commontex:$(CURDIR)/Doc/texinputs; \
	cd Doc; \
	../plasTeX/plastex plastex.tex
	mv Doc/plastex html

override_dh_installdocs:
	dh_installdocs -ppython-plastex-doc --doc-main-package=python3-plastex
	dh_installdocs --remaining-packages

override_dh_auto_install:
	dh_auto_install
	mkdir -p debian/plastex/usr/
	rm -rf debian/*/usr/share/doc/*/html/.cache/
	mv debian/python3-plastex/usr/bin debian/plastex/usr/

override_dh_auto_test:
	# to set PLASTEX_COMMANDLINE to the interpreter-dependent value
	# the entire buildsystem needs to be overridden for the tests
	PYBUILD_SYSTEM=custom \
	  PYBUILD_TEST_ARGS='cd {build_dir}; PLASTEX_COMMANDLINE=$(CURDIR)/build/scripts-{version}/plastex {interpreter} -m pytest -v -rxs' \
	  dh_auto_test --buildsystem=pybuild