File: rules

package info (click to toggle)
python-django-formtools 2.4.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,052 kB
  • sloc: python: 2,141; makefile: 196
file content (43 lines) | stat: -rwxr-xr-x 1,399 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
#!/usr/bin/make -f

UPSTREAM_GIT := https://github.com/django/django-formtools.git
include /usr/share/openstack-pkg-tools/pkgos.make

export SETUPTOOLS_SCM_PRETEND_VERSION=$(shell dpkg-parsechangelog -SVersion | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~git.*//' -e 's/~/.0/' -e 's/+dfsg1//' -e 's/+ds1//' | head -n 1)

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

override_dh_auto_clean:
	rm -rf build *.egg-info .coverage
	find . -iname '*.pyc' -delete
	for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done

override_dh_auto_build:
	echo "Do nothing..."

override_dh_auto_test:
	echo "Do nothing..."

override_dh_auto_install:
	pkgos-dh_auto_install --no-py2

ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	set -e ; set -x ; for pyvers in $(PYTHON3S); do \
		PYMAJOR=`echo $$pyvers | cut -d'.' -f1` ; \
		echo "===> Testing with python$$pyvers (python$$PYMAJOR)" ; \
		if [ $$PYMAJOR = "2" ] ; then \
			LIBDIR_END=$$pyvers ; \
		else \
			LIBDIR_END=$$PYMAJOR ; \
		fi ; \
		PYTHONPATH=. DJANGO_SETTINGS_MODULE=tests.settings PYTHON=python$${pyvers} python$${PYMAJOR}-coverage run /usr/bin/django-admin test tests ; \
	done
endif


override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. python3 -m sphinx -b html docs debian/python-django-formtools-doc/usr/share/doc/python-django-formtools-doc/html
	dh_sphinxdoc
endif