#!/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 $@ --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 dh_auto_build ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) make -C docs/ html SPHINXBUILD="/usr/share/sphinx/scripts/python3/sphinx-build" SPHINXOPTS="-j 4 -D today=\"$(BUILD_DATE)\"" endif find . -name objects.inv -delete override_dh_auto_install: mkdir -p debian/python-radon-doc/usr/share/doc/python-radon-doc/html/_static/ ln -sf /usr/share/javascript/mathjax/MathJax.js debian/python-radon-doc/usr/share/doc/python-radon-doc/html/_static/MathJax.js dh_auto_install --destdir=$(CURDIR)/debian/radon/ 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