File: rules

package info (click to toggle)
software-properties 0.92.25debian1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,964 kB
  • ctags: 412
  • sloc: python: 4,664; makefile: 21; sh: 18
file content (30 lines) | stat: -rwxr-xr-x 726 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
#!/usr/bin/make -f

PY3REQUESTED := $(shell py3versions -r)
PY3DEFAULT := $(shell py3versions -d)
# Run setup.py with the default python3 last so that the scripts use
# #!/usr/bin/python3 and not #!/usr/bin/python3.X.
PY3 := $(filter-out $(PY3DEFAULT),$(PY3REQUESTED)) python3

%:
	dh $@ --with python2,python3

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build

override_dh_auto_build:
	dh_auto_build
	set -ex; for python in $(PY3); do \
		$$python setup.py build; \
	done

override_dh_auto_install:
	dh_auto_install
	set -ex; for python in $(PY3); do \
               $$python setup.py install --root=$(CURDIR)/debian/tmp \
						--install-layout=deb; \
	done

override_dh_python3:
	dh_python3 --shebang=/usr/bin/python3