File: rules

package info (click to toggle)
yattag 1.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 168 kB
  • sloc: python: 1,243; makefile: 26
file content (36 lines) | stat: -rwxr-xr-x 883 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
#!/usr/bin/make -f

PY3VERS := $(shell py3versions -s)


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

override_dh_auto_build:
	set -e ; \
	for python in $(PY3VERS); do \
		$$python setup.py build; \
	done

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	# run tests
	for test in test/tests_* ;\
	do \
	    for python in $(PY3VERS); do \
		echo "running "$$test" on "$$python ; \
		LIB=$$($$python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print(b.build_purelib)") ; \
		PYTHONPATH=$(CURDIR)/$$LIB $$python $$test ; \
	    done ; \
	done
endif

override_dh_auto_install:
	set -e ; \
	for python in $(PY3VERS); do \
		$$python setup.py install --root=debian/python3-yattag --install-layout=deb; \
	done


override_dh_installdocs:
	dh_installdocs -A README.rst