File: rules

package info (click to toggle)
python-lark 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,788 kB
  • sloc: python: 13,305; javascript: 88; makefile: 34; sh: 8
file content (40 lines) | stat: -rwxr-xr-x 1,193 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

# output every command that modifies files on the build system.
export DH_VERBOSE=1
# switch on verbose pybuild output
export PYBUILD_VERBOSE=1

export PYBUILD_NAME=lark

export PYVERSIONS=$(shell py3versions -s)

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

export DOCDIR=$(CURDIR)/debian/python-lark-doc/usr/share/doc/python-lark-doc

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

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build docs/examples lark.egg-info

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml docs/ build/html # HTML generator
	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bman  docs/ build/man  # Manpage generator

# Run tests using "python<version> -m tests",
# see https://github.com/lark-parser/lark/issues/792 for details
override_dh_auto_test:
	for python in $(PYVERSIONS); do \
		PYTHONWARNINGS=d $$python -m tests 2>&1; \
	done

override_dh_installexamples:
	dh_installexamples
	# Replace duplicate files in HTML documentation directory with symbolic links
	jdupes -rlO $(DOCDIR)/examples $(DOCDIR)/html
	find $(DOCDIR) -name __pycache__ | xargs --no-run-if-empty rm -rf