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 44 45 46 47
|
#!/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
|