File: rules

package info (click to toggle)
ptable 0.9.2-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 332 kB
  • sloc: python: 1,651; makefile: 27; sh: 3
file content (40 lines) | stat: -rwxr-xr-x 1,085 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# For running tests, we need UTF-8 charset
# See #604706 for references about this method
LOCALE_PATH	:= debian/tmpdir/usr/lib/locale
LOCALE_NAME	:= en_US
LOCALE_CHARSET	:= UTF-8

export PYBUILD_NAME=ptable

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

override_dh_auto_install:
	dh_auto_install
	rm -rf $(CURDIR)/debian/python-ptable/usr/bin
	rm -rf $(CURDIR)/debian/python3-ptable/usr/bin

override_dh_auto_clean:
	rm -rf $(LOCALE_PATH)
	dh_clean

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	# configure a local charset dir, for testing purposes
	mkdir -p $(LOCALE_PATH)
	localedef -i $(LOCALE_NAME) -c -f $(LOCALE_CHARSET) \
		-A /usr/share/locale/locale.alias --quiet \
		$(LOCALE_PATH)/$(LOCALE_NAME).$(LOCALE_CHARSET)
	LOCPATH=$(LOCALE_PATH) \
		LC_ALL=$(LOCALE_NAME).$(LOCALE_CHARSET) \
		PYBUILD_SYSTEM=custom \
		PYBUILD_TEST_ARGS="cd {build_dir} ; {interpreter} prettytable_test.py" \
		dh_auto_test
endif

override_dh_installdocs:
	dh_installdocs -A README.rst