#!/usr/bin/make -f # Uncomment this to turn on verbose mode. # export DH_VERBOSE=1 # Prevent setuptools/distribute from accessing the internet. export http_proxy = http://127.0.0.1:9 package=python-gnupg-ng package3=python3-gnupg-ng export PYBUILD_DESTDIR_python2=debian/$(package)/ export PYBUILD_DESTDIR_python3=debian/$(package3)/ WITH_SPHINXDOC = $(shell if [ -x /usr/bin/dh_sphinxdoc ]; then echo "--with sphinxdoc"; fi) PYVERS=$(shell pyversions -r) PY3VERS = $(shell py3versions -r) %: dh $@ --with python2,python3 $(WITH_SPHINXDOC) --buildsystem=python_distutils override_dh_compress: dh_compress -i -X.rst -X.js -X.html -X.txt override_dh_auto_build: python$* setup.py build_sphinx set -ex; \ for python in $(PYVERS) $(PY3VERS); do \ $$python setup.py build; \ done override_dh_auto_clean: dh_auto_clean rm -rf build *.egg-info __pycache__ # docs/_build debian/docs find \( -name '._*' -o -name '*.pyc' \) -delete override_dh_auto_install: set -ex; \ for python in $(PYVERS); do \ $$python setup.py install --skip-build --root $(PYBUILD_DESTDIR_python2) \ --install-layout deb; \ done rm $(PYBUILD_DESTDIR_python2)usr/bin/versioneer.py set -ex; \ for python in $(PY3VERS); do \ $$python setup.py install --skip-build --root $(PYBUILD_DESTDIR_python3) \ --install-layout deb; \ done rm $(PYBUILD_DESTDIR_python3)usr/bin/versioneer.py