summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 6760ad9ef7e0ee0b9032c8489baafcd7a10fb4ff (plain)
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
#!/usr/bin/make -f
# -*- makefile -*-
#
# Copyright (c) 2003-2011 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export PYBUILD_NAME=logilab-common
PACKAGE3:=python3-logilab-common

%:
	dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_install:
	dh_auto_install
	# rename logilab-pytest and its man page for python3k
	mv debian/$(PACKAGE3)/usr/bin/logilab-pytest debian/$(PACKAGE3)/usr/bin/logilab-pytest3
	sed -i 's/python -u/python3 -u/' debian/$(PACKAGE3)/usr/bin/logilab-pytest3
	install -D docs/logilab-pytest.1 debian/$(PACKAGE3)/usr/share/man/man1/logilab-pytest3.1
	sed -i 's/logilab-pytest/logilab-pytest3/' debian/$(PACKAGE3)/usr/share/man/man1/logilab-pytest3.1
	gzip debian/$(PACKAGE3)/usr/share/man/man1/logilab-pytest3.1

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	python3 -m logilab.common.pytest -t test
endif