File: rules

package info (click to toggle)
python-mccabe 0.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 132 kB
  • ctags: 92
  • sloc: python: 462; makefile: 32
file content (43 lines) | stat: -rwxr-xr-x 970 bytes parent folder | download | duplicates (4)
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
43
#!/usr/bin/make -f
PY2_PACKAGE_NAME=python-mccabe
PY3_PACKAGE_NAME=python3-mccabe

PYVERS=$(shell pyversions -r)
PY3VERS=$(shell py3versions -r)

%:
	dh $@  --with python2,python3

override_dh_auto_clean:
	rm -rf mcabe.egg-info
	dh_auto_clean

override_dh_auto_build:
	set -xe; \
	for py in $(PYVERS) $(PY3VERS); do \
		$$py setup.py build; \
	done

override_dh_auto_install:
	set -xe; \
	for py in $(PYVERS); do \
		$$py setup.py install --skip-build --root debian/$(PY2_PACKAGE_NAME) \
		--install-layout deb; \
	done
	set -xe; \
		for py in $(PY3VERS); do \
		$$py setup.py install --skip-build --root debian/$(PY3_PACKAGE_NAME) \
		--install-layout deb; \
	done

	# Remove me when dh_python2 can handle this file
	rm -vf debian/*/usr/lib/python*/*-packages/*.egg-info/SOURCES.txt

override_dh_python2:
	dh_python2 --shebang=/usr/bin/python

override_dh_python3:
	dh_python3 --shebang=/usr/bin/python3

override_dh_installchangelogs:
	dh_installchangelogs README.rst