rules 981 Bytes
Newer Older
"Sylvain ext:(%22)'s avatar
0.1.0  
"Sylvain ext:(%22) committed
1
2
3
4
5
6
7
#!/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)
#
8
# Copyright (c) 2003-2011 LOGILAB S.A. (Paris, FRANCE).
"Sylvain ext:(%22)'s avatar
0.1.0  
"Sylvain ext:(%22) committed
9
10
11
12
13
# http://www.logilab.fr/ -- mailto:contact@logilab.fr

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

Julien Cristau's avatar
Julien Cristau committed
14
15
16
17
include /usr/share/python/python.mk
# don't build the python3 package if python3 is < 3.3
py3k = $(subst python3.,,$(shell py3versions -d))
build_py3k = $(shell test "$(py3k)" -gt 2 && echo 1)
"Sylvain ext:(%22)'s avatar
0.1.0  
"Sylvain ext:(%22) committed
18

Julien Cristau's avatar
Julien Cristau committed
19
20
21
22
ifeq (,$(build_py3k))
    DH_OPTIONS += -Npython3-logilab-mtconverter
    export DH_OPTIONS
endif
"Sylvain ext:(%22)'s avatar
0.1.0  
"Sylvain ext:(%22) committed
23

Julien Cristau's avatar
Julien Cristau committed
24
25
install-python%:
	python$* setup.py install --prefix=$(CURDIR)/debian/tmp
"Sylvain ext:(%22)'s avatar
0.1.0  
"Sylvain ext:(%22) committed
26

Julien Cristau's avatar
Julien Cristau committed
27
28
29
override_dh_auto_install: $(foreach python, $(shell py3versions -r), install-$(python))
	dh_auto_install
	rm -f debian/tmp/usr/lib/python*/*/logilab/__init__.py
"Sylvain ext:(%22)'s avatar
0.1.0  
"Sylvain ext:(%22) committed
30

Julien Cristau's avatar
Julien Cristau committed
31
32
%:
	dh $@ --with python2,python3