File: rules

package info (click to toggle)
python-byteplay 0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 256 kB
  • sloc: python: 1,318; makefile: 36; sh: 6
file content (45 lines) | stat: -rwxr-xr-x 1,006 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
43
44
45
#!/usr/bin/make -f

export PYTHONWARNINGS=d
export PYTHONPATH=.

python_all = pyversions -r | tr ' ' '\n' | xargs -t -I {} env {}

.PHONY: clean
clean:
	dh_testdir
	dh_clean
	rm -rf build
	find -name '*.py[co]' -delete

.PHONY: build build-arch build-indep
build build-indep: build/stamp

build/stamp:
	dh_testdir
ifeq "$(filter nocheck,$(DEB_BUILD_OPTIONS))" ""
	$(python_all) debian/run-tests.py
endif
	$(python_all) setup.py build
	sed -n -r -e 's/^ {8}//p' PKG-INFO > build/README
	touch $(@)

.PHONY: binary binary-arch binary-indep
binary binary-indep: build/stamp
	dh_testdir
	dh_testroot
	dh_prep
	$(python_all) setup.py install --prefix=/usr --root=debian/python-byteplay/
	sed -i 's/^Metadata-Version: 1\.0$$/Metadata-Version: 1.1/' debian/*/usr/lib/python2.*/*-packages/*.egg-info
	dh_installdocs build/README
	dh_installexamples examples/*.py
	dh_installchangelogs
	dh_pysupport
	dh_compress -X examples
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# vim:ts=4 sw=4 noet