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
|
#!/usr/bin/make -f
PYTHON2=$(shell pyversions -r)
%:
dh $@ --with python2
override_dh_install:
set -e; \
for python in $(PYTHON2); do \
$$python setup.py install --install-layout=deb --root=$(CURDIR)/debian/python-pygraphviz; \
$$python-dbg setup.py install --install-layout=deb --root=$(CURDIR)/debian/python-pygraphviz-dbg; \
done
override_dh_strip:
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
dh_strip -ppython-pygraphviz --dbg-package=python-pygraphviz-dbg
endif
override_dh_installexamples:
dh_installexamples -ppython-pygraphviz examples/*
override_dh_installdocs:
dh_installdocs --link-doc=python-pygraphviz
override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
set -e; \
for python in $(PYTHON2); do \
LIB=$$($$python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print (b.build_purelib)") ; \
touch $(CURDIR)/$$LIB/pygraphviz/tests/__init__py ; \
cd build ; $$python -c "import sys ; sys.path.insert(0, '$(CURDIR)/$$LIB') ; import pygraphviz as t ; t.test()" ; cd .. ; \
rm $(CURDIR)/$$LIB/pygraphviz/tests/__init__py ; \
LIB=$$($$python-dbg -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print (b.build_purelib)") ; \
touch $(CURDIR)/$$LIB/pygraphviz/tests/__init__py ; \
cd build ; $$python-dbg -c "import sys ; sys.path.insert(0, '$(CURDIR)/$$LIB') ; import pygraphviz as t ; t.test()" ; cd .. ; \
rm $(CURDIR)/$$LIB/pygraphviz/tests/__init__py ; \
done
endif
|