File: rules

package info (click to toggle)
python-plac 1.4.5-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 648 kB
  • sloc: python: 2,185; lisp: 57; makefile: 49; sh: 20
file content (39 lines) | stat: -rwxr-xr-x 1,267 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
#!/usr/bin/make -f
export PYBUILD_NAME = plac

ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
export PYBUILD_TEST_ARGS = -vv
endif

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_build:
 # Build HTML documentation with Sphinx
	dh_auto_build
	if [ -f doc/conf.py ]; then \
	    mkdir -p doc/_build/html; \
	    sphinx-build -b html -D html_theme=alabaster \
	        -A today="" -A release="" -A version="" \
	        doc doc/_build/html || echo "Documentation build failed, continuing..."; \
	    rm -rf doc/_build/html/.doctrees; \
	    rm -rf doc/_build/html/_sources; \
	    rm -f doc/_build/html/_static/doctools.js; \
	    rm -f doc/_build/html/_static/language_data.js; \
	    rm -f doc/_build/html/_static/searchtools.js; \
	fi

execute_after_dh_auto_install:
	find . -type d -name '__pycache__' -exec rm -rf {} +

 # Force deterministic order by recompiling bytecode
	if [ -d debian/python3-plac ]; then \
	    find debian/python3-plac -name '*.pyc' -delete; \
	    find debian/python3-plac -name '*.pyo' -delete; \
	    find debian/python3-plac -name '__pycache__' -type d -exec rm -rf {} +; \
	    PYTHONHASHSEED=1 python3 -m compileall -q -f debian/python3-plac; \
	fi

 # Recognize file.<ext>.1 format
override_dh_installman:
	dh_installman --language=C