File: rules

package info (click to toggle)
python-mimeparse 0.1.4-1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 96 kB
  • sloc: python: 149; makefile: 24
file content (35 lines) | stat: -rwxr-xr-x 817 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

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

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

override_dh_clean:
	dh_clean
	rm -rf build

override_dh_auto_install:
	dh_auto_install

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

	set -e && for pyvers in $(PY3VERS); do \
		python$$pyvers setup.py install --install-layout=deb \
			--root $(CURDIR)/debian/python3-mimeparse; \
	done


get-orig-source:
	uscan --noconf --force-download --download-current-version --destdir=${CURDIR}

test-python%:
	python$* mimeparse_test.py

ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test: ${PYVERS:%=test-python%} ${PY3VERS:%=test-python%}
endif