File: rules

package info (click to toggle)
python-argcomplete 1.8.1-1.5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 448 kB
  • sloc: python: 1,991; sh: 66; makefile: 35
file content (46 lines) | stat: -rwxr-xr-x 1,425 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
44
45
46
#!/usr/bin/make -f
# -*- makefile -*-

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

# Avoid failures in unit tests
# See https://github.com/kislyuk/argcomplete/issues/199
export LC_ALL=C.UTF-8
unexport TERM

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

override_dh_auto_install:
	dh_auto_install -O--buildsystem=pybuild
	mkdir -p debian/python3-argcomplete/usr/share/man/man1
	for i in \
		activate-global-python-argcomplete \
		python-argcomplete-check-easy-install-script \
		python-argcomplete-tcsh \
		register-python-argcomplete; \
	do \
		mv debian/python3-argcomplete/usr/bin/$$i debian/python3-argcomplete/usr/bin/$${i}3; \
		sed -i -e 's/python-argcomplete-tcsh/python-argcomplete-tcsh3/' debian/python3-argcomplete/usr/bin/$${i}3; \
		cp debian/$$i.1 debian/python3-argcomplete/usr/share/man/man1/$${i}3.1; \
	done

generate_manpages:
	VERSION=$$(./setup.py -V) ; \
	for file in \
		activate-global-python-argcomplete \
		python-argcomplete-check-easy-install-script \
		register-python-argcomplete; \
	do \
		cp -f scripts/$$file debian/$$file ; \
		chmod a+x debian/$$file ; \
		PYTHONPATH=. help2man --version-string="$$VERSION" \
			--no-info --include=debian/help2man.include \
			--name "$$file - argcomplete utility script" \
			-o debian/$$file.1 --no-discard-stderr \
			debian/$$file ; \
		rm -f debian/$$file; \
	done ; \
	rm -f argcomplete/*.py[co]