File: rules

package info (click to toggle)
python-schema-salad 7.0.20210124093443-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,216 kB
  • sloc: python: 10,129; java: 1,179; makefile: 174; xml: 120; javascript: 46; sh: 6
file content (50 lines) | stat: -rwxr-xr-x 1,721 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
47
48
49
50
#!/usr/bin/make -f

DH_VERBOSE := 1

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

export PYBUILD_NAME=schema-salad
#export PYBUILD_DISABLE=test

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

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. help2man --no-info \
		   --version-string=${DEB_VERSION_UPSTREAM} \
		   --no-discard-stderr \
		--name="Schema Annotations for Linked Avro Data (SALAD)" \
		python3\ -m\ schema_salad > debian/schema-salad-tool.1
	sed -i 's/python3 -m schema_salad/schema-salad-tool/g' \
		debian/schema-salad-tool.1
	sed -i 's/__main__.py/schema-salad-tool/g' debian/schema-salad-tool.1
	sed -i 's/PYTHON/SCHEMA-SALAD-TOOL/g' debian/schema-salad-tool.1
	PYTHONPATH=. help2man --no-info \
		   --version-string=${DEB_VERSION_UPSTREAM} \
		   --no-discard-stderr \
		--name="Schema Annotations for Linked Avro Data (SALAD)" \
		python3\ -m\ schema_salad.makedoc > debian/schema-salad-doc.1
	sed -i 's/python3 -m schema_salad.makedoc/schema-salad-doc/g' \
		debian/schema-salad-doc.1
	sed -i 's/__main__.py/schema-salad-doc/g' debian/schema-salad-doc.1
	sed -i 's/PYTHON/SCHEMA-SALAD-DOC/g' debian/schema-salad-doc.1
	find . -name "*.coverage" -delete

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_install
	PYBUILD_SYSTEM=custom \
	PYBUILD_TEST_ARGS="cd {dir}; export PATH={destdir}/usr/bin:$$PATH ; \
	cd {build_dir}; export PYTHONPATH=$$(pwd); {interpreter} -m pytest \
		-n auto --dist=loadfile --pyargs schema_salad -k 'not test_secondaryFiles and not test_outputBinding'" dh_auto_test
endif

override_dh_auto_install:
	dh_auto_install
	find debian -name LICENSE -delete
	find debian -name '*.cwl' -exec chmod a+x {} \;

override_dh_auto_clean:
	rm -f debian/*.1