File: rules

package info (click to toggle)
python-osprofiler 4.2.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 760 kB
  • sloc: python: 4,828; makefile: 170; sh: 161
file content (37 lines) | stat: -rwxr-xr-x 1,159 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
#!/usr/bin/make -f

LAST_CHANGE = $(shell dpkg-parsechangelog -S Date)
BUILD_DATE  = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
SPHINXOPTS := -D html_last_updated_fmt="$(BUILD_DATE)"

UPSTREAM_GIT := https://github.com/openstack/osprofiler.git
include /usr/share/openstack-pkg-tools/pkgos.make

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

override_dh_auto_clean:
	rm -rf build
	rm -rf doc/source/contributor
	find . -type d -name __pycache__ -exec rm -r {} \+

override_dh_auto_build:
	echo "Do nothing..."

override_dh_auto_test:
	echo "Do nothing..."

override_dh_auto_install:
	pkgos-dh_auto_install --no-py2 --in-tmp
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	pkgos-dh_auto_test --no-py2 'osprofiler\.tests\.(?!.*OptsTestCase\.test_entry_point.*|.*unit\.drivers\.test_jaeger.*|.*test_otlp.*|.*ElasticsearchTestCase.*)'
endif

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. python3 -m sphinx $(SPHINXOPTS) -b html doc/source debian/python-osprofiler-doc/usr/share/doc/python-osprofiler-doc/html
	dh_sphinxdoc
endif

override_dh_python3:
	dh_python3 --shebang=/usr/bin/python3