File: rules

package info (click to toggle)
configobj 4.7.2%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,060 kB
  • sloc: python: 2,103; makefile: 33
file content (40 lines) | stat: -rwxr-xr-x 1,055 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
#!/usr/bin/make -f
# -*- makefile -*-

%:
	dh $@ --with python2

override_dh_auto_build:
	dh_auto_build
	env PYTHONPATH=`pwd` epydoc --name ConfigObj \
		--url http://www.voidspace.org.uk/python/configobj.html \
		-o api configobj

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	set -ex; \
	export PYTHONPATH=.; \
	export PYTHONWARNINGS=default; \
	for py in $(shell pyversions -r); do \
		$$py tests/test_configobj.py; \
		if [ "$$py" = "python2.7" ]; then \
			$$py -m unittest discover -s tests; \
		else \
			$$py $(shell which unit2) discover -s tests; \
		fi; \
	done
endif

override_dh_compress:
	dh_compress -X.js

get-orig-source:
	set -e; \
	VER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^+]+).*,\1,p'); \
	uscan --noconf --force-download --download-version=$$VER --destdir=.; \
	unzip configobj-$$VER.zip; \
	rm configobj-$$VER.zip; \
	rm -r __MACOSX; \
	GZIP=--best tar -cz --owner root --group root --mode a+rX \
	                -f configobj_$$VER+ds.orig.tar.gz configobj-$$VER; \
	rm -r configobj-$$VER