File: rules

package info (click to toggle)
python-argcomplete 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 532 kB
  • sloc: python: 2,512; makefile: 27; sh: 19
file content (42 lines) | stat: -rwxr-xr-x 1,151 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
#!/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
unexport LC_ALL

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

# Workaround
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1010941
# https://github.com/kislyuk/argcomplete/issues/337#issuecomment-771835184
override_dh_auto_test:
	echo "set enable-bracketed-paste off" > .inputrc
	INPUTRC=$(CURDIR)/.inputrc dh_auto_test

override_dh_auto_clean:
	rm -f .inputrc
	dh_auto_clean

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]