File: rules

package info (click to toggle)
python-repoze.who 2.2-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 936 kB
  • ctags: 909
  • sloc: python: 6,085; makefile: 84
file content (41 lines) | stat: -rwxr-xr-x 1,236 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
36
37
38
39
40
41
#!/usr/bin/make -f

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

BUILD_DATE = $(shell dpkg-parsechangelog --show-field Date)
BUILD_DATE_FORMATTED = $(shell LC_ALL=C date --utc --date="$(BUILD_DATE)" "+%B %d, %Y")

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

override_dh_install:
	set -e ; for pyvers in $(PYTHONS); do \
		python$$pyvers setup.py install --install-layout=deb \
			--root $(CURDIR)/debian/python-repoze.who; \
	done
	set -e ; for pyvers in $(PYTHON3S); do \
		python$$pyvers setup.py install --install-layout=deb \
			--root $(CURDIR)/debian/python3-repoze.who; \
	done
	rm -rf $(CURDIR)/debian/python*/usr/lib/python*/dist-packages/*.pth

	find $(CURDIR)/debian/python-repoze.who -iname __pycache__ -exec rm -rf {} \;

override_dh_clean:
	dh_clean -O--buildsystem=python_distutils
	rm -rf docs/.build build

override_dh_auto_build:
	PYTHONPATH=. sphinx-build -b html -D today="$(BUILD_DATE_FORMATTED)" docs $(CURDIR)/debian/python-repoze.who/usr/share/doc/python-repoze.who/html

override_dh_auto_install:
	dh_auto_install
	find debian/ -name '*.pth' -delete


override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	nosetests
	nosetests3
endif