Debian Codegraph @

debian/rules

raw
1 #! /usr/bin/make -f
2
3 ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
4 export DH_VERBOSE = 1
5 export PYBUILD_VERBOSE=1
6 export VERBOSE=1
7 else
8 export DH_QUIET = 1
9 endif
10
11 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
12 export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
13 DPKG_EXPORT_BUILDFLAGS = 1
14 include /usr/share/dpkg/buildflags.mk
15 include /usr/share/dpkg/pkg-info.mk
16
17 CXXFLAGS += $(CPPFLAGS)
18
19 BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "@$(SOURCE_DATE_EPOCH)")
20 SPHINXOPTS:=-D today=\"$(BUILD_DATE)\"
21 SPHINXOPTS+=-D html_last_updated_fmt=\"$(BUILD_DATE)\"
22
23 %:
24 dh $@ --buildsystem pybuild
25
26 execute_after_dh_auto_build-indep: HOME=$(CURDIR)/debian/.debhelper/generated/_source/home
27 execute_after_dh_auto_build-indep:
28 pybuild --build -i python3 -s custom --build-args 'make -C {dir}/doc html'
29 find doc/_build/html/ -name '*.html' -exec sed -r -i \
30 -e 's,(<script async="async" )src(="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>),<!-- \1DISABLED\2 -->,' \
31 {} +
32
33 execute_after_dh_auto_clean:
34 $(RM) -r doc/_build/
35 $(RM) doc/constants.inc
36
37 override_dh_auto_test:
38 dh_auto_test -- -s custom --test-args="PYTHONPATH={build_dir} cp -r {dir}/test {build_dir} && cd {build_dir}/test && {interpreter} -m pytest --verbosity=2 -k 'not test_event_set_callback' && rm -rf {build_dir}/test"
39
40 execute_after_dh_auto_install-arch:
41 find debian/tmp -name .gitignore -print -delete
42
43 execute_after_dh_installexamples-indep:
44 ln -sfv /usr/share/doc/python-pyopencl-doc/examples/demo.py debian/python-pyopencl-doc/usr/share/doc/python-pyopencl-doc/html/_downloads/*/demo.py
45 ln -sfv /usr/share/doc/python-pyopencl-doc/examples/demo_elementwise.py debian/python-pyopencl-doc/usr/share/doc/python-pyopencl-doc/html/_downloads/*/demo_elementwise.py