File: rules

package info (click to toggle)
pep8 1.7.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 668 kB
  • sloc: python: 3,193; makefile: 150; sh: 13
file content (34 lines) | stat: -rwxr-xr-x 891 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
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
PYTHONS:=$(shell pyversions -vr)
PYTHON3S:=$(shell py3versions -vr)
PYVERS=$(shell pyversions -r)
PY3VERS=$(shell py3versions -r)

%:
	dh  $@ --buildsystem=python_distutils --with python2,python3

override_dh_auto_install:
	set -e && for pyvers in $(PYTHONS); do \
		python$$pyvers setup.py install --install-layout=deb \
			--root $(CURDIR)/debian/python-pep8; \
	done

	set -e && for pyvers in $(PYTHON3S); do \
		python$$pyvers setup.py install --install-layout=deb \
			--root $(CURDIR)/debian/python3-pep8; \
	done
	rm -rf debian/python-pep8/usr/bin
	rm -rf debian/python3-pep8/usr/bin

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	set -xe; \
	for py in $(PYVERS) $(PY3VERS); do \
		$$py setup.py test; \
	done
endif

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