File: rules

package info (click to toggle)
pyparallel 0.2.2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 116 kB
  • sloc: python: 191; makefile: 20
file content (29 lines) | stat: -rwxr-xr-x 707 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
#!/usr/bin/make -f
# -*- makefile -*-

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

export PYBUILD_NAME = pyparallel

PYTHON3	:= /usr/bin/python3
PY3VERS	:= $(shell py3versions -vs)

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

override_dh_python3:
	: # Replace all '#!' calls to python with $(PYTHON3)
	: # and make them executable
	for i in `find debian/python3-parallel -mindepth 3 -type f`; do \
	  sed '1s,#!.*python[^ ]*\(.*\),#! $(PYTHON3)\1,' \
	        $$i > $$i.temp; \
	  if cmp --quiet $$i $$i.temp; then \
	    rm -f $$i.temp; \
	  else \
	    mv -f $$i.temp $$i; \
	    chmod 755 $$i; \
	    echo "fixed interpreter: $$i"; \
	  fi; \
	done
	dh_python3 -ppython3-parallel