#!/usr/bin/make -f # -*- makefile -*- PY2VERS=$(shell pyversions -vr) PY3VERS=$(shell py3versions -vr) PYLIBPATH := $(shell python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print b.build_platlib") %: dh $@ --with python2,python3 override_dh_auto_build: set -e ; \ for py in $(PY2VERS) $(PY3VERS); do \ python$$py setup.py build ; \ python$$py-dbg setup.py build ; \ done # build doc PYTHONPATH=$(PYLIBPATH) ./gendoc.sh override_dh_auto_clean: rm -f Levenshtein.html NEWS.xhtml dh_auto_clean override_dh_auto_install: set -e ; \ for py in $(PY2VERS); do \ python$$py setup.py install --root $(CURDIR)/debian/python-levenshtein --install-layout=deb ; \ python$$py-dbg setup.py install --root $(CURDIR)/debian/python-levenshtein-dbg --install-layout=deb ; \ done for py in $(PY3VERS); do \ python$$py setup.py install --root $(CURDIR)/debian/python3-levenshtein --install-layout=deb ; \ python$$py-dbg setup.py install --root $(CURDIR)/debian/python3-levenshtein-dbg --install-layout=deb ; \ done find $(CURDIR)/debian/python-levenshtein-dbg -type f -name "*.egg-info" -delete find $(CURDIR)/debian/python3-levenshtein-dbg -type f -name "*.egg-info" -delete override_dh_installdocs: dh_installdocs README.rst NEWS NEWS.xhtml Levenshtein.html override_dh_installexamples: dh_installexamples StringMatcher.py override_dh_strip: ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) dh_strip -p python-levenshtein --dbg-package=python-levenshtein-dbg dh_strip -p python3-levenshtein --dbg-package=python3-levenshtein-dbg endif