File: rules

package info (click to toggle)
gyp 0.1%2B20220404git9ecf45e-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,564 kB
  • sloc: python: 29,455; ansic: 1,087; cpp: 855; sh: 327; lisp: 258; objc: 234; asm: 43; makefile: 32
file content (38 lines) | stat: -rwxr-xr-x 1,381 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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

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

override_dh_auto_build:
	dh_auto_build
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	a2x -L --doctype manpage --format manpage $(CURDIR)/debian/gyp.txt > $(CURDIR)/debian/gyp.1
endif

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test -- --system custom --test-args "\
		mkdir -p {build_dir}/bin; \
		ln -s \$$(command -v {interpreter}) {build_dir}/bin/python; \
		PATH={build_dir}/bin:\$$PATH; \
		export PATH; \
		printf '#!/bin/sh\nset -e\n{interpreter} {build_dir}/gyp_main.py \"\$$@\"\n' > {build_dir}/gyp.sh; \
		chmod +x {build_dir}/gyp.sh; \
		chmod +x {build_dir}/gyp_main.py; \
		cd {build_dir}; \
		: removing/skipping non-deterministic tests that rely on ordering in serialization of Python objects; \
		rm -f test/variables/commands/gyptest-commands-ignore-env.py; \
		rm -f test/variables/commands/gyptest-commands-repeated.py; \
		rm -f test/variables/commands/gyptest-commands.py; \
		rm -f test/variables/filelist/gyptest-filelist-golden.py; \
		LDFLAGS="-Wl,--no-warn-execstack" TESTCMD_VERBOSE=1 TESTGYP_GYP=gyp.sh PRESERVE_FAIL=1 {interpreter} gyptest.py --verbose --all; \
		test 0 -eq \$$? && rm -rf bin out gyp.sh; \
	"
endif

override_dh_auto_clean:
	-dh_auto_clean
	rm -rf build pylib/gyp.egg-info
	rm -f debian/gyp.1