blob: 23520586292bf4e34b9eb7edf85d759d9b257063 [file] [log] [blame]
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
#
# adapted by Logilab for automatic generation by debianize
# (part of the devtools project, http://www.logilab.org/projects/devtools)
#
# Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
PACKAGE:=$(shell grep Package debian/control | cut -d ' ' -f2)
include /usr/share/python3/python.mk
%:
dh --with python3 $@
override_dh_install:
NO_SETUPTOOLS=1 python3 setup.py -q install --no-compile \
--root=$(CURDIR)/debian/$(PACKAGE)/ \
${py_setup_install_args}
# rename executables
for executable in pylint pylint-gui symilar epylint pyreverse ; do \
new_exec="$$executable"3; \
mv $(CURDIR)/debian/$(PACKAGE)/usr/bin/$$executable $(CURDIR)/debian/$(PACKAGE)/usr/bin/$$new_exec; \
done
# remove test directory
rm -rf debian/$(PACKAGE)/usr/lib/python*/*-packages/pylint/test
# generate pylint man page automatically (only when sources are py3k compatible)
PYTHONPATH=debian/$(PACKAGE)/usr/lib/python3/dist-packages python3 $(CURDIR)/bin/pylint --generate-man > $(CURDIR)/man/pylint.1
# rename and install man pages
#for manpage in man/* ; do \
# new_manpage="$(shell basename ${manpage} .1)"3.1; \
# mv $$manpage $$new_manpage; \
#done
mv man/pylint.1 man/pylint3.1
mv man/pyreverse.1 man/pyreverse3.1
dh_installman man/*.1
override_dh_installdocs:
dh_installdocs README*
dh_installchangelogs -i ChangeLog