Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 #export DH_VERBOSE = 1
5
6 include /usr/share/dpkg/buildflags.mk
7
8 DPKG_EXPORT_BUILDFLAGS = 1
9 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
10 export PYBUILD_NAME=pyinstrument
11
12 SPHINXOPTS := -E -N
13
14 %:
15 dh $@ --buildsystem=pybuild
16
17 override_dh_auto_clean:
18 dh_auto_clean
19 rm -rf .mypy_cache .pytest_cache
20
21 override_dh_sphinxdoc:
22 cd .pybuild && \
23 PYTHONPATH=$$PWD/`dirname $$(find . -type d -name "$(PYBUILD_NAME)*dist-info" | sort | head -n1)` && \
24 PATH=$(shell realpath $$(find . -type d -name scripts | sort | head -n1)):$(PATH) && \
25 export PYTHONPATH && \
26 export PATH && \
27 python3 -m sphinx -b man $(SPHINXOPTS) ../docs $(CURDIR)/debian
28 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
29 cd .pybuild && \
30 PYTHONPATH=$$PWD/`dirname $$(find . -type d -name "$(PYBUILD_NAME)*dist-info" | sort | head -n1)` && \
31 PATH=$(shell realpath $$(find . -type d -name scripts | sort | head -n1)):$(PATH) && \
32 export PYTHONPATH && \
33 export PATH && \
34 python3 -m sphinx -b html $(SPHINXOPTS) ../docs $(CURDIR)/debian/python-$(PYBUILD_NAME)-doc/usr/share/doc/python-$(PYBUILD_NAME)-doc/html
35 rm -rf $(CURDIR)/debian/python-$(PYBUILD_NAME)-doc/usr/share/doc/python-$(PYBUILD_NAME)-doc/html/.doctree
36 cp docs/img/screenshot.jpg $(CURDIR)/debian/python-$(PYBUILD_NAME)-doc/usr/share/doc/python-$(PYBUILD_NAME)-doc/html/_images
37 sed -i -e 's,https:\/\/github.com\/joerick\/pyinstrument\/raw\/main\/docs\/img\/,file:\/\/\/usr\/share\/doc\/python-$(PYBUILD_NAME)-doc\/html\/_images\/,g' \
38 $(CURDIR)/debian/python-$(PYBUILD_NAME)-doc/usr/share/doc/python-$(PYBUILD_NAME)-doc/html/home.html
39 endif
40 dh_sphinxdoc
41
42 override_dh_fixperms:
43 for FILE in `find $(CURDIR)/debian/python3-$(PYBUILD_NAME)/ -type f -name ".gitignore"`; do \
44 rm -rf $${FILE} ;\
45 done
46 dh_fixperms