File: rules

package info (click to toggle)
radon 6.0.1%2Bds1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 952 kB
  • sloc: python: 4,890; makefile: 185
file content (43 lines) | stat: -rwxr-xr-x 1,645 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
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

include /usr/share/dpkg/pkg-info.mk

export BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d @"$(SOURCE_DATE_EPOCH)")

# Prevent setuptools/distribute from accessing the internet.
export http_proxy = http://127.0.9.1:9

# This has to be exported to make some magic below work.
export DH_OPTIONS
export PYBUILD_NAME=radon

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

override_dh_auto_build:
	mkdir -p debian/python-radon-doc/usr/share/doc/python-radon-doc/html/_static/
	ln -s /usr/share/javascript/mathjax/MathJax.js debian/python-radon-doc/usr/share/doc/python-radon-doc/html/_static/MathJax.js
	python3 setup.py build
	make -C docs/ html SPHINXBUILD="/usr/share/sphinx/scripts/python3/sphinx-build" SPHINXOPTS="-j 4 -D today=\"$(BUILD_DATE)\""
	find . -name objects.inv -delete

override_dh_auto_install:
	mkdir -p debian/python-radon-doc/usr/share/doc/python-radon-doc/html/_static/
	ln -s /usr/share/javascript/mathjax/MathJax.js debian/python-radon-doc/usr/share/doc/python-radon-doc/html/_static/MathJax.js
	python3 setup.py install --root=$(CURDIR)/debian/radon/ --install-layout=deb
	rst2man debian/radon.rst > debian/radon.1
	dh_installman -pradon debian/radon.1
	find . -name objects.inv -delete

override_dh_auto_test:
	# uses autopkgtest due to avoid adding extra build deps
	true

override_dh_auto_clean:
	python3 setup.py clean -a
	find . -path '*/__pycache__/*' -delete
	find . -type d -name '__pycache__' -empty -delete
	${RM} -r docs/_build/ radon.egg-info .pytest_cache