File: rules

package info (click to toggle)
python-cliff 1.15.0-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 452 kB
  • ctags: 359
  • sloc: python: 2,100; makefile: 182; sh: 29
file content (54 lines) | stat: -rwxr-xr-x 1,782 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
#!/usr/bin/make -f

PYTHONS:=$(shell pyversions -vr)
PYTHON3S:=$(shell py3versions -vr)

UPSTREAM_GIT := https://github.com/openstack/cliff.git
include /usr/share/openstack-pkg-tools/pkgos.make
export OSLO_PACKAGE_VERSION=$(shell dpkg-parsechangelog | grep Version: | cut -d' ' -f2 | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~/.0/' | head -n 1)


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

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

override_dh_installchangelogs:
	dh_installchangelogs -O--buildsystem=python_distutils doc/source/history.rst

override_dh_clean:
	dh_clean
	rm -rf cliff.egg-info build

override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=$(CURDIR) sphinx-build -b html -a -c doc/source doc/source \
	    $(CURDIR)/debian/python-cliff-doc/usr/share/doc/python-cliff-doc/html
	dh_sphinxdoc -O--buildsystem=python_distutils -ppython-cliff-doc
endif

override_dh_python2:
	dh_python2 -O--buildsystem=python_distutils -ppython-cliff

override_dh_python3:
	dh_python3 -O--buildsystem=python_distutils -ppython3-cliff

override_dh_compress:
	dh_compress -O--buildsystem=python_distutils -i -X.rst -X.js -X.html -X.txt -X.py

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	set -e ; set -x ; for i in 2.7 $(PYTHON3S) ; do \
		PYMAJOR=`echo $$i | cut -d'.' -f1` ; \
		echo "===> Testing with python$$i (python$$PYMAJOR)" ; \
		PYTHONPATH=. PYTHON=python$$i python$$i -m nose -v ; \
	done
endif