File: rules

package info (click to toggle)
python-setuptools-git 1.2-3
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 140 kB
  • sloc: python: 492; makefile: 25
file content (41 lines) | stat: -rwxr-xr-x 920 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export GIT_CONFIG=$(CURDIR)/debian/gitconfig

PYTHON3=$(shell py3versions -vr)

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

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
test-python%:
	python$* setup.py test -vv || true

override_dh_auto_test: $(PYTHON3:%=test-python%)
endif

build-python%:
	python$* setup.py build

override_dh_auto_build: $(PYTHON3:%=build-python%)
	dh_auto_build
	rst2man README.rst | nroff -mandoc > README.txt

install-python%:
	python$* setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb

override_dh_auto_install: $(PYTHON3:%=install-python%)
	dh_auto_install

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build
	rm -rf *.egg-info
	rm -f README.txt

get-orig-source:
	uscan --verbose --force-download --rename --repack --download-current-version --destdir=../build-area