File: rules

package info (click to toggle)
webtest 1.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 592 kB
  • sloc: python: 3,562; makefile: 42
file content (55 lines) | stat: -rwxr-xr-x 1,350 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
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/make -f

#export DH_VERBOSE=1

DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
PYVERS=$(shell pyversions -vr)
PKGDIR=$(CURDIR)/debian/python-webtest

clean:
	dh_testdir
	dh_testroot
	rm -rf dist build
	find . -name *\.py[co] -exec rm {} \;
	dh_clean build-docs* $(PYVERS:%=install-python%)

build: build-indep
build-arch:
build-indep: build-docs

build-docs:
	dh_testdir
	dh_installdirs
	mkdir -p docs/_static # Sphinx needs it
	PYTHONPATH=. sphinx-build -N -q -E -b html docs/ $(PKGDIR)/usr/share/doc/python-webtest/docs/
	touch $@

install: $(PYVERS:%=install-python%)
install-python%:
	python$* setup.py install \
		--single-version-externally-managed \
		--root $(CURDIR)/debian/python-webtest
	touch $@

binary-indep: build install
	dh_testdir -i
	dh_testroot -i
	dh_installchangelogs -i
	dh_installdocs -i
	dh_sphinxdoc -i
	dh_python2 -i
	# it's not an extra license file
	echo "python-webtest: extra-license-file usr/share/doc/python-webtest/docs/_sources/license.txt" \
		>> $(PKGDIR)/usr/share/lintian/overrides/python-webtest
	dh_compress -i -X.py -X.js
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i -- -Z bzip2

binary-arch:

binary: binary-indep binary-arch

.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install build