File: rules

package info (click to toggle)
python-xsdata 22.12-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,828 kB
  • sloc: python: 27,588; xml: 403; makefile: 37; sh: 6
file content (34 lines) | stat: -rwxr-xr-x 864 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
#!/usr/bin/make -f

export PYBUILD_NAME=xsdata

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

override_dh_auto_clean:
	dh_auto_clean
	rm -rf .pytest_cache
	rm -rf docs/api/reference/*
	rm -f $(PYBUILD_NAME).1

override_dh_auto_build:
	dh_auto_build
ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml docs/ build/html
endif

override_dh_auto_install:
	dh_auto_install
	PYTHONPATH=. help2man debian/python3-$(PYBUILD_NAME)/usr/bin/$(PYBUILD_NAME) \
	  --no-info \
	  --section 1 \
	  --name "$(shell grep '^Description' debian/control | head -n 1 | cut -d: -f2)" \
	  > $(PYBUILD_NAME).1
	# Not sure why help2man generate broken file here
	sed -i 's!xsdata,!xsdata!g' xsdata.1
	sed -i 's!XSDATA,!XSDATA!g' xsdata.1

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_PROFILES)),)
	dh_auto_test
endif