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
|
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
export PYBUILD_DESTDIR_python2=debian/python-snimpy/
export PYBUILD_DESTDIR_python3=debian/python3-snimpy/
%:
dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
override_dh_auto_clean:
dh_auto_clean
rm -rf snimpy/__pycache__
override_dh_installdocs:
dh_installdocs
PYTHONPATH=. sphinx-build -N -q -E -b html docs/ \
debian/python-snimpy-doc/usr/share/doc/python-snimpy-doc/html/
# We cannot run any test since we would need some MIBS unavailable in Debian (main)
override_dh_auto_test:
override_dh_python2:
dh_python2
# cffi not needed at runtime, remove it from requires
sed -i '/^cffi/d' \
debian/python-snimpy/usr/lib/python2*/dist-packages/snimpy*.egg-info/requires.txt
override_dh_python3:
dh_python3
# cffi not needed at runtime, remove it from requires
sed -i '/^cffi/d' \
debian/python3-snimpy/usr/lib/python3*/dist-packages/snimpy*.egg-info/requires.txt
override_dh_install:
dh_install
# Move snimpy executable in its dedicated package
mkdir -p debian/snimpy/usr debian/snimpy/usr/share/man
mv debian/python3-snimpy/usr/bin debian/snimpy/usr/.
mv debian/python3-snimpy/usr/share/man/man1 debian/snimpy/usr/share/man/.
rm -rf debian/python-snimpy/usr/bin debian/python-snimpy/usr/share/man
rm -rf debian/python3-snimpy/usr/bin debian/python3-snimpy/usr/share/man
|