File: rules

package info (click to toggle)
python-keyring 0.7.1-1%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 428 kB
  • sloc: python: 1,563; makefile: 29
file content (42 lines) | stat: -rwxr-xr-x 938 bytes parent folder | download
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
41
42
#!/usr/bin/make -f

#DH_VERBOSE=1

PYTHON2=$(shell pyversions -vr)
PYTHON3=$(shell py3versions -vr)

%:
	dh $@ --with python2,python3

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
test-python2.7:
	# The test suite needs a functioning $HOME.
	mkdir -p build/home
	HOME=$(CURDIR)/build/home \
	python$* -m unittest discover

test-python%:
	@echo "Test suite does not run in Python $@.  Skipping."

override_dh_auto_test: $(PYTHON2:%=test-python%) $(PYTHON3:%=test-python%)
else
	@echo "nocheck set, skipping tests"
endif

override_dh_auto_build:
	dh_auto_build
	set -ex; for py in $(PYTHON3) ; do \
		python$$py setup.py build; \
	done;

override_dh_auto_install:
	dh_auto_install
	set -ex; for py in $(PYTHON3) ; do \
		python$$py setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
	done;

override_dh_installchangelogs:
	dh_installchangelogs -k CHANGES.txt

get-orig-source:
	uscan --force-download --repack --verbose